There are a few ways to apply the auth middleware in your project.
#laravel#auth
// In the Controller constructor...publicfunction__constructor(){$this->middleware('auth')// Apply login authorization to all functions// or$this->middleware('auth')->only(['store','update'])// Apply login authorization only to the given functions// or$this->middleware('auth')->except(['show'])// Apply login authorization to all except the given functions}...// In the routes file you can apply Auth Middleware to specific routesRoute::get('item','ItemsController@index')->middleware('auth');