Migrate backend to Porto architecture and fix minor bugs
- Fully transitioned the backend to the Porto architectural pattern - Improved code organization and maintainability - Fixed minor bugs and inconsistencies
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Ship\Middleware;
|
||||
|
||||
use App\Ship\Abstracts\Middleware\Authenticate as AbstractMiddleware;
|
||||
|
||||
class Authenticate extends AbstractMiddleware
|
||||
{
|
||||
/**
|
||||
* 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 '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user