Authentication does not work after executing the make: auth command

0

I run the command:

SmartFlex> php artisan migrate  

within my project and it is finalized correctly. The login and registry options are available in view , but when trying to access the registry, for example, the following error occurs:

  

NotFoundHttpException in RouteCollection.php line 179:   in RouteCollection.php line 179   at RouteCollection-> match (object (Request)) in Router.php line 533   at Router-> findRoute (object (Request)) in Router.php line 512   at Router-> dispatchToRoute (object (Request)) in Router.php line 498   at Router-> dispatch (object (Request)) in Kernel.php line 174   at Kernel-> Illuminate \ Foundation \ Http {closure} (object (Request)) in Pipeline.php line 30   at Pipeline-> Illuminate \ Routing {closure} (object (Request)) in TransformsRequest.php line 30   at TransformsRequest-> handle (object (Request), object (Closure)) in Pipeline.php line 148   at Pipeline-> Illuminate \ Pipeline {closure} (object (Request)) in Pipeline.php line 53   at Pipeline-> Illuminate \ Routing {closure} (object (Request)) in TransformsRequest.php line 30   at TransformsRequest-> handle (object (Request), object (Closure)) in Pipeline.php line 148   at Pipeline-> Illuminate \ Pipeline {closure} (object (Request)) in Pipeline.php line 53   at Pipeline-> Illuminate \ Routing {closure} (object (Request)) in ValidatePostSize.php line 27   at ValidatePostSize-> handle (object (Request), object (Closure)) in Pipeline.php line 148   at Pipeline-> Illuminate \ Pipeline {closure} (object (Request)) in Pipeline.php line 53   at Pipeline-> Illuminate \ Routing {closure} (object (Request)) in CheckForMaintenanceMode.php line 46   at CheckForMaintenanceMode-> handle (object (Request), object (Closure)) in Pipeline.php line 148   at Pipeline-> Illuminate \ Pipeline {closure} (object (Request)) in Pipeline.php line 53   at Pipeline-> Illuminate \ Routing {closure} (object (Request)) in Pipeline.php line 102   at Pipeline-> then (object (Closure)) in Kernel.php line 149   at Kernel-> sendRequestThroughRouter (object (Request)) in Kernel.php line 116   at Kernel-> handle (object (Request)) in index.php line 54

I have already looked at several post on route problems but nothing worked.

    
asked by anonymous 27.05.2017 / 03:27

1 answer

2

This error can happen if the authentication routes are not correctly registered in your route file.

To confirm this, run the command below and see if the authentication paths are registered:

php artisan route:list

IntheLaraveldocumentationwecanfind:

  

Wanttogetstartedfast?Justrunphpartisanmake:authandphp  artisanmigrateinafreshLaravelapplication.Then,navigateyour  browserto link or any other URL that is   assigned to your application. These two commands will take care of   scaffolding your entire authentication system!

Before running php artisan migrate we need to execute php artisan make:auth .

Underneath the cloths, we have the following steps that are done by these commands:

  • Creating Authentication Routes

    In this step the following routes are included in routes/web.php

    Auth::routes();
    
    Route::get('/home', 'HomeController@index')->name('home');
    

    These routes point to the controllers that are created together with the installation of Laravel in app\Http\Controllers\Auth

  • Creating Authentication Views

    Here scaffolds are created from views for login and records, in resources/views/auth

  • Tables in the database

    The php artisan migrate command will perform database migrations that are in database/migrations . Laravel includes two tables that are created for authentication, the user table and the password_resets table.

29.05.2017 / 02:01