I want to restrict some routes of my application and only allow that to only my authenticated user.
I tried check using the auth:check()
function but it doesn't seem to work.
// Route Restriction
if (Auth::check()){
//Web Directory
Route::get('web-directory','WebDirectoryController@index');
}
When I got to mysite/web-directory
I still get 404 Error - even if I'm currently log-in.
What is the best way to restrict any routes in Laravel 5.0 ?