0

Я хочу сделать страницу входа в систему, используя Laravel 5.2. Я написал все маршруты, контроллер и страницу просмотра. Но когда я пытаюсь получить доступ к localhost: auth/login Он показывает следующую ошибку.Объект, не найденный в Ларавеле 5.2 Аутентификационные маршруты

Объект не найден!

Запрашиваемый URL-адрес не был найден на этом сервере. Если вы указали URL-адрес вручную, проверьте правильность написания и повторите попытку.

Если вы считаете, что это ошибка сервера, обратитесь к веб-мастеру.

Вот мой AuthController:

<?php 

namespace App\Http\Controllers\Auth; 

use App\User; 
use Validator; 
use App\Http\Controllers\Controller; 
use Illuminate\Foundation\Auth\ThrottlesLogins; 
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; 

class AuthController extends Controller 
{ 
    /* 
    |-------------------------------------------------------------------------- 
    | Registration & Login Controller 
    |-------------------------------------------------------------------------- 
    | 
    | This controller handles the registration of new users, as well as the 
    | authentication of existing users. By default, this controller uses 
    | a simple trait to add these behaviors. Why don't you explore it? 
    | 
    */ 

    use AuthenticatesAndRegistersUsers, ThrottlesLogins; 

    /** 
    * Where to redirect users after login/registration. 
    * 
    * @var string 
    */ 
    protected $redirectTo = '/'; 

    /** 
    * Create a new authentication controller instance. 
    * 
    * @return void 
    */ 
    public function __construct() 
    { 
     $this->middleware('guest', ['except' => 'logout']); 
    } 

    /** 
    * Get a validator for an incoming registration request. 
    * 
    * @param array $data 
    * @return \Illuminate\Contracts\Validation\Validator 
    */ 
    protected function validator(array $data) 
    { 
     return Validator::make($data, [ 
      'name' => 'required|max:255', 
      'email' => 'required|email|max:255|unique:users', 
      'password' => 'required|confirmed|min:6', 
     ]); 
    } 

    /** 
    * Create a new user instance after a valid registration. 
    * 
    * @param array $data 
    * @return User 
    */ 
    protected function create(array $data) 
    { 
     return User::create([ 
      'name' => $data['name'], 
      'email' => $data['email'], 
      'password' => bcrypt($data['password']), 
     ]); 
    } 
    protected $loginPath = '/login'; 
} 

Вот моя страница login.blade.php:

<form method="POST" action="/auth/login"> 
    {!! csrf_field() !!} 

    <div> 
     Email 
     <input type="email" name="email" value="{{ old('email') }}"> 
    </div> 

    <div> 
     Password 
     <input type="password" name="password" id="password"> 
    </div> 

    <div> 
     <input type="checkbox" name="remember"> Remember Me 
    </div> 

    <div> 
     <button type="submit">Login</button> 
    </div> </form> 

А вот страница маршруты:

<?php 

/* 
|-------------------------------------------------------------------------- 
| Routes File 
|-------------------------------------------------------------------------- 
| 
| Here is where you will register all of the routes in an application. 
| It's a breeze. Simply tell Laravel the URIs it should respond to 
| and give it the controller to call when that URI is requested. 
| 
*/ 

Route::get('/', function() { 
    return view('welcome'); 
}); 

/* 
|-------------------------------------------------------------------------- 
| Application Routes 
|-------------------------------------------------------------------------- 
| 
| This route group applies the "web" middleware group to every route 
| it contains. The "web" middleware group is defined in your HTTP 
| kernel and includes session state, CSRF protection, and more. 
| 
*/ 

Route::group(['middleware' => ['web']], function() { 
    // 
}); 

Route::get('auth/login', 'Auth\[email protected]'); 
Route::post('auth/login', 'Auth\[email protected]'); 
Route::get('auth/logout', 'Auth\[email protected]'); 

// Registration routes... 
Route::get('auth/register', 'Auth\[email protected]'); 
Route::post('auth/register', 'Auth\[email protected]'); 

Пожалуйста Помогите любому, кто может решить эту проблему! :)

ответ