| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | <?phpnamespace App\Http\Requests\Article;use App\Http\Requests\Request;class ArticleTranslateRequest 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 [            'translate_title' => 'required',            'translate_title2' => 'nullable',            'translate_content' => 'required',            'status' => 'required',            'thumb' => 'nullable',        ];    }    public function attributes()    {        return [            'translate_title' => '英文标题',            'translate_content' => '英文正文',            'status' => '软文状态'        ];    }}
 |