28 lines
484 B
PHP
28 lines
484 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Requests;
|
||
|
|
||
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
||
|
class UploadProfilePicRequest extends FormRequest{
|
||
|
|
||
|
public function authorize()
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
'image' => 'required|image',
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function messages(){ //if i want to change the errors mgs!
|
||
|
return [
|
||
|
'image.required' => ' The image field is required.
|
||
|
If you wish to Cancel click Cancel ',
|
||
|
];
|
||
|
}
|
||
|
}
|