31 lines
538 B
PHP
31 lines
538 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ContactRequest extends FormRequest
|
|
{
|
|
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
public function rules()
|
|
{
|
|
return [
|
|
'name' => 'required|min:2',
|
|
'last_name' => 'required',
|
|
'email' => 'required|email',
|
|
'message' => 'required'
|
|
];
|
|
}
|
|
// public function messages(){ //if i want to change the errors mgs!
|
|
// return [
|
|
//
|
|
//
|
|
// ];
|
|
// }
|
|
}
|