Lae/app/Http/Requests/Remote/Server/StatusRequest.php
2022-11-08 21:01:43 +08:00

34 lines
665 B
PHP

<?php
namespace App\Http\Requests\Remote\Server;
use App\Models\Server\Status;
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 [
//
];
}
}