ldc-dam/app/Http/Requests/Bo/ShowInterfaceRequest.php

38 lines
807 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\Bo;
use Illuminate\Foundation\Http\FormRequest;
class ShowInterfaceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
// * Dossier
'd' => 'sometimes|numeric',
// * Sujet
's' => 'sometimes|exists:sujets,codeSujet',
// * text search
't' => 'sometimes|string',
// * Recherche
'r' => 'sometimes|exists:recherches,id'
];
}
}