Lae/app/Http/Requests/Remote/Server/StatusRequest.php
2023-01-10 21:42:27 +08:00

33 lines
635 B
PHP

<?php
namespace App\Http\Requests\Remote\Server;
use Illuminate\Foundation\Http\FormRequest;
class StatusRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
$server = $this->route('server');
return $server->query()->where('module_id', auth('module')->id())->exists();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
//
];
}
}