You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
577 B
PHP
28 lines
577 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ContactRequest extends FormRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
// todo: required first name if no last name and vice versa
|
|
|
|
return [
|
|
'customer_id' => 'required|exists:customers,id',
|
|
'first_name' => 'string',
|
|
'last_name' => 'string',
|
|
'email' => 'string',
|
|
'phone' => 'string',
|
|
'notes' => 'string'
|
|
];
|
|
}
|
|
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|