Eshop-Laravel/app/Http/Requests/UploadProfilePicRequest.php

28 lines
484 B
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
<?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 ',
];
}
}