I've created a Dashboard page and i want it to be accessed only if an user is logged in. The login and register were made with the php artisan make:auth
command. Any tips or ideas how to accomplish this ?
Just add the Auth middleware to your route
Route::get('dashboard', function () {
//whatever
})->middleware('auth');
Make sure you have
use Auth;
in your routes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With