34 lines
652 B
PHP
34 lines
652 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()
|
||
|
{
|
||
|
$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 [
|
||
|
//
|
||
|
];
|
||
|
}
|
||
|
}
|