Я только что начал приложение laravel 5.2. Каждый маршрут, который я принимаю (/ register/logout, login, ...), перенаправляет меня на домашнюю страницу.Laravel 5.2 - Каждый маршрут перенаправляется на домашнюю страницу
Вот мои маршруты
<?php
Route::group(['middleware' => ['web']], function() {
//Register
Route::get('/register', 'Auth\[email protected]');
Route::get('/register/success', 'Auth\[email protected]');
Route::post('/register', 'Auth\[email protected]');
//Login
Route::get('/login', 'Auth\[email protected]');
Route::post('/login', 'Auth\[email protected]');
//Password Reset
Route::get('/password/reset/email', 'Auth\[email protected]');
Route::get('/password/reset/{token}', 'Auth\[email protected]');
Route::get('/password/reset/sent', 'Auth\[email protected]');
Route::post('/password/reset/email', 'Auth\[email protected]');
Route::post('/password/reset', 'Auth\[email protected]');
});
Route::group(['middleware' => ['web', 'auth']], function() {
Route::get('/logout', 'Auth\[email protected]');
});
Route::get('/', function() {
return view('welcome');
});
, когда я удалить Route::group(['middleware' => ['web']], function() {
линию я могу получить доступ к странице, но это дает мне ошибку
Undefined переменной: ошибки
Вот почему требуется веб-среда, поэтому я немного застрял.
Контроллер и виды работ. Это просто перенаправление, которое я не могу понять.
Благодарим за помощь!
Вашего маршрут, который возвращение 'welcome' страницы должна быть перед другими маршрутами – Veniamin