AssetFileRequest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace App\Http\Requests;
4 
6 
7 class AssetFileRequest extends Request
8 {
14  public function authorize()
15  {
16  return true;
17  }
18 
24  public function rules()
25  {
26  return [
27  'file.*' => 'required|mimes:png,gif,jpg,jpeg,doc,docx,pdf,txt,zip,rar|max:2000'
28  ];
29  }
30 
31  public function response(array $errors)
32  {
33  return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag);
34  }
35 }
rules()
Get the validation rules that apply to the request.
authorize()
Determine if the user is authorized to make this request.