ldc-supportweb/app/Http/Requests/EraseCellContentRequest.php
Jérémy Munsch 7cc4303f03
Add Planning functionnality
- bump kwaadpepper/crud-policies
- npm i vue-select moment --save-dev
- Add Planning components
- csrf_token to axios
- Add Model WeekendPlanning
- Add Enums CellModel, CellType, TableRow
2021-10-02 13:57:00 +02:00

37 lines
804 B
PHP

<?php
namespace App\Http\Requests;
use App\Enums\Planning\TableRow;
use Illuminate\Foundation\Http\FormRequest;
use Kwaadpepper\Enum\Rules\EnumIsValidRule;
class EraseCellContentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->check() and $this->ajax();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'id' => 'required|exists:week_plannings,id',
'day' => 'required|numeric',
'row' => [
'required',
new EnumIsValidRule(TableRow::class)
],
];
}
}