Reputation: 113
I'm having a "spotlight" page that should pass an authorization but even after i implemented these it's just going to that page directly
These are the codes in web.php
Route::get('spotlight', array(
'before' => 'auth.basic',
function()
{
return view('spotlight');
}));
There were similar questions i tried but didn't find a solution. Anything missing here. Browser based authentication not prompting
Upvotes: 1
Views: 293
Reputation: 1821
If you are using laravel 5.4 you can attach middleware using middleware()
function
Route::get('spotlight', function () {
return view('spotlight');
})->middleware('auth.basic');
Upvotes: 4