| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | <?phpnamespace App\Http\Requests\Site;use App\Http\Requests\Request;class SocialPublishRequest extends Request{    /**     * Determine if the user is authorized to make this request.     *     * @return bool     */    public function authorize()    {        return true;    }    /**     * Get the validation rules that apply to the request.     *     * @return array     */    public function rules()    {        if (!$this->ajax()) {            return [];        }        return [            'checkIds' => 'required|array',            'release_at' => 'required',            'release_interval' => 'required|numeric',            'social_ids' => 'required',            'label_id' => 'nullable',//            'pin_board'=>'nullable'        ];    }    public function attributes()    {        return [            'checkIds' => '页面',            'release_at' => '发布时间',            'release_interval' => '发布间隔',            'social_ids' => '社交账号类型',        ];    }}
 |