1234567891011121314151617 |
- <?php
- namespace App\Http\Middleware;
- use Illuminate\Auth\Middleware\Authenticate as Middleware;
- use Illuminate\Http\Exceptions\HttpResponseException;
- class Authenticate extends Middleware
- {
- protected function unauthenticated($request, array $guards)
- {
- throw new HttpResponseException(response()->json([
- 'status' => false,
- 'message' => 'Unauthorized'
- ], 403));
- }
- }
|