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

34 lines
652 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;
use Illuminate\Foundation\Http\FormRequest;
class StatusRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
$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>
*/
public function rules()
{
return [
//
];
}
}