2024-08-30 02:17:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
class AuthorizedRequest extends RestRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*/
|
|
|
|
public function authorize(): bool
|
|
|
|
{
|
2024-08-30 10:24:26 +02:00
|
|
|
return cache()->remember('isSessionAuthorized'.session()->id(), 5, function () {
|
2024-08-30 10:18:50 +02:00
|
|
|
return auth()->check();
|
|
|
|
});
|
2024-08-30 02:17:13 +02:00
|
|
|
}
|
|
|
|
}
|