Controllers And Middleware In Laravel 5.4

Submitted by azazqadir - 2 months ago

In Laravel 5.4, all controllers are created in the Controllers folder, located in App/Http/Controllers. All the controllers must have namespace App\Http\Controllers and extends from the Controller class. Source: https://www.cloudways.com/blog/controllers-middleware-laravel-5-4/

Route::resource('book', 'BookController', ['only' => [
 
   'index', 'show'
 
]]);
 
Route::resource('book', 'BookController', ['except' => [
 
   'create', 'store', 'update', 'destroy'
 
]]);
comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks