Upgrade to Laravel 10
This commit is contained in:
parent
c4d7dc31d5
commit
16b120bc73
142 changed files with 1676 additions and 2019 deletions
|
@ -7,18 +7,17 @@ namespace App\Http\Middleware;
|
|||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class MyAuthMiddleware
|
||||
{
|
||||
/**
|
||||
* Check the user is logged in.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (Auth::check($request->user()) == false) {
|
||||
//they’re not logged in, so send them to login form
|
||||
if (Auth::check() === false) {
|
||||
// they’re not logged in, so send them to login form
|
||||
return redirect()->route('login');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue