mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
40 lines
946 B
PHP
40 lines
946 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class GroupsRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'shop_id' => ['required', 'integer', 'exists:shops,id'],
|
|
'title' => ['required', 'string'],
|
|
'datetimerange' => ['required', 'array'],
|
|
'is_save_preview' => ['required', 'integer'],
|
|
'group_id' => ['integer'],
|
|
'delete_ids' => ['array'],
|
|
'new_ids' => ['required_if:group_id,0','array'],
|
|
'change_data' => ['array'],
|
|
// 'sort' => ['array'],
|
|
];
|
|
}
|
|
}
|