2022-04-01 10:18:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
namespace App\Http\Requests\Bo\Folders;
|
2022-04-01 10:18:04 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
class StoreDepotFolderRequest extends FormRequest
|
2022-04-01 10:18:04 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
2022-06-20 14:57:58 +02:00
|
|
|
public function authorize(): bool
|
2022-04-01 10:18:04 +02:00
|
|
|
{
|
|
|
|
|
return auth()->check();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
2022-06-20 14:57:58 +02:00
|
|
|
* @return array<string, mixed>
|
2022-04-01 10:18:04 +02:00
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2022-06-20 14:57:58 +02:00
|
|
|
'libelle' => 'required|string|min:4|max:255|unique:dossiers,libelle',
|
|
|
|
|
'description' => 'nullable|string|min:4'
|
2022-04-01 10:18:04 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|