123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace App\Http\Requests\Site;
- use App\Http\Requests\Request;
- class SocialQueueRequest 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 [
- 'media' => 'nullable',
- 'url' => 'required',
- 'content' => 'required',
- 'publish_at' => 'required',
- 'social_ids' => 'required',
- 'release_interval'=>'required',
- ];
- }
- public function attributes()
- {
- return [
- 'media' => '缩略图',
- 'url' => '地址',
- 'content' => '内容',
- 'publish_at' => '发布时间',
- 'social_ids' => '社交账号类型',
- 'release_interval'=>'间隔时间',
- ];
- }
- }
|