Lae/app/Http/Requests/Remote/Server/StatusRequest.php

34 lines
648 B
PHP
Raw Normal View History

2022-08-14 17:03:41 +00:00
<?php
namespace App\Http\Requests\Remote\Server;
use App\Models\Server\Status;
2022-09-08 16:12:02 +00:00
use Anik\Form\FormRequest;
2022-08-14 17:03:41 +00:00
class StatusRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
2022-09-08 16:12:02 +00:00
public function authorize(): bool
2022-08-14 17:03:41 +00:00
{
$server = $this->route('server');
return $server->query()->where('module_id', auth('remote')->id())->exists();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
2022-09-08 16:12:02 +00:00
public function rules(): array
2022-08-14 17:03:41 +00:00
{
return [
//
];
}
}