| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | <?phpnamespace App\Http\Requests\Link;use App\Http\Requests\Request;use Illuminate\Validation\Rule;use Illuminate\Database\Query\Builder;class CaseSaveRequest 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 [            'type' => 'required',            'url' => 'nullable',            'username_history' => 'nullable',            'email_history' => 'nullable',            'password_history' => 'nullable',            'url_history' => 'nullable',        ];    }    public function attributes()    {        return [            'type' => '外链类型',            'url' => '平台链接',            'url_history' => 'profile演示地址',            'username_history' => '用户名',            'email_history' => '邮箱',            'password_history' => '密码',        ];    }}
 |