make:auth do not create Route::group

Asked

Viewed 62 times

1

I am studying Laravel following the following tutorial and I stopped at the part where the instructor gives the following command line

 php artisan make:auth

In it creates the following block:

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

    Route::auth();

    Route::get('/home', 'HomeController@index');
});

In mine only creates the lines:

 Route::auth();

 Route::get('/home', 'HomeController@index');

This if I put manually the block does not work.

Gives a

Whoops, looks like something went wrong.
FatalErrorException

You got a problem if you don’t have that group?

Where can I be missing?

  • 1

    Possibly your . env is with debug disabled so is errors are masked. The error that Voce must be getting, perhaps refers to them not existing the web group in the middleware file. More to confirm this, first enable the debug of . env to see the actual stack of errors.

  • Probably you and whoever made the video are using different versions of Laravel. I think the mistake you are having is because of the middleware. In any case, it’s like Mauricio said in the comment above. Enables debug or query the error log, as it will help you understand what went wrong.

  • Actually, the video was made in May 2016. And I’m having a hard time keeping up with the video. In his it works and in mine it doesn’t. I tried to keep going, but I couldn’t.

1 answer

1


No problem if Route::auth(); not in a group of routes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.