1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Http\Requests\Link;
- use App\Http\Requests\Request;
- class HallSaveRequest 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 [
- 'username' => 'required',
- 'email' => 'required',
- 'password' => 'required',
- 'url' => 'required',
- 'show_urls' => 'required|array',
- 'remark' => 'nullable',
- 'status' => 'required'
- ];
- }
- public function attributes()
- {
- return [
- 'username' => '用户名',
- 'email' => '邮箱',
- 'password' => '密码',
- 'url' => 'profile演示地址',
- 'show_urls' => '演示地址',
- 'remark' => '备注',
- 'status' => '状态'
- ];
- }
- }
|