Hey, what does your view folder look like? Also post the error.
Project flyer and routes in 5.2
Sorry to post a lot to this forum today, But i'm a bit lost in the series "Project flyer". The problem is, i'm using Laravel 5.2 and it's build in auth system.
I can't follow along the series because of the web middleware. I'm stuck around video 14. Nothing works anymore and i have tried cleaning up the routes file, watched tutorials about how to arrange it - but i just can't get it to work. At the moment when i viset the homepage, it says View [auth.login] cant be found lol.
What am i missing? - please help.
Route::get('/', 'PageController@index');
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
Route::resource("flyer", "FlyerController");
Route::resource("flyer", "FlyerController");
Route::get('{zip}/{street}', 'flyerController@show');
// Routes that require login
Route::group(['middleware' => ['web']], function () {
Route::auth();
Route::post("{zip}/{street}/photos", "FlyerController@addPhoto");
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
});
Get rid of all of those explicit auth routes are unnecessary since Route::auth() will generate all of these for you:
+--------+----------+-------------------------+------+-----------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-------------------------+------+-----------------------------------------------------------------+------------+
| | GET|HEAD | login | | App\Http\Controllers\Auth\AuthController@showLoginForm | web,guest |
| | POST | login | | App\Http\Controllers\Auth\AuthController@login | web,guest |
| | GET|HEAD | logout | | App\Http\Controllers\Auth\AuthController@logout | web |
| | POST | password/email | | App\Http\Controllers\Auth\PasswordController@sendResetLinkEmail | web,guest |
| | POST | password/reset | | App\Http\Controllers\Auth\PasswordController@reset | web,guest |
| | GET|HEAD | password/reset/{token?} | | App\Http\Controllers\Auth\PasswordController@showResetForm | web,guest |
| | GET|HEAD | register | | App\Http\Controllers\Auth\AuthController@showRegistrationForm | web,guest |
| | POST | register | | App\Http\Controllers\Auth\AuthController@register | web,guest |
+--------+----------+-------------------------+------+-----------------------------------------------------------------+------------+
Move everything that remains inside the web middleware group - this provides the basic web app middlewares that your app will need by default to allow :
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
Please or to participate in this conversation.