support plugin

This commit is contained in:
xiaomlove
2022-06-03 03:42:53 +08:00
parent 29d414ce0a
commit 44c750234a
21 changed files with 333 additions and 68 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class NexusAuth extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return getSchemeAndHttpHost() . '/login.php';
}
}
}