1

php file inside app\Http\routes.php this is my route code

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

    //getDashboard
    Route::get('dashboard', [
        'as'    => 'get.register',
        'uses'  => 'dashboardController@getCreate'
    ]);


});

and when i go to my url http://localhost/crudlara/public/dashboard it displays the error of

Sorry, the page you are looking for could not be found. (1/1) NotFoundHttpException

Can someone help me figured this thing out? in laravel version 5.2.10 that route code im using runs well.

Any help is muchly appreciated. TIA

Software Developer
  • 197
  • 2
  • 7
  • 22

1 Answers1

3

Because you're using 5.4, you should put all routes into the routes/web.php file and remove 'middleware' => ['web'] part.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
  • no, just `routes/web.php` . You have the `routes` folder in your project root since 5.4 – gbalduzzi Jul 20 '17 at 16:41
  • Hi thanks for your help it worked now. can i ask some question for this one? (2/2) ErrorException View [main] not found. (View: C:\xampp\htdocs\crudlara\resources\views\dashboard.blade.php) – Software Developer Jul 20 '17 at 16:54
  • @PHPDev looks like the `dashboard` view extends or includes `main` view which doesn't exist. If you'll not be able to fix that, please create another question and put `dashboard` view contents in it. – Alexey Mezenin Jul 20 '17 at 16:57
  • thanks. i already solve it i just create a min.blade.php file – Software Developer Jul 20 '17 at 17:04