Using search while the session has expired will generate a 401
This commit is contained in:
@@ -21,6 +21,10 @@ class SearchController extends Controller
|
||||
{
|
||||
$result = collect();
|
||||
|
||||
// If the user isnt logged in
|
||||
if (! Auth::user())
|
||||
abort(401,'Need to login');
|
||||
|
||||
// If there isnt a term value, return null
|
||||
if (! $request->input('term'))
|
||||
return $result;
|
||||
|
Reference in New Issue
Block a user