25 lines
578 B
PHP
25 lines
578 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Inventory;
|
|
|
|
use App\Http\Requests\ApiFormRequest;
|
|
|
|
class SupplierUpdateRequest extends ApiFormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return auth()->check();
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['sometimes', 'string', 'max:255'],
|
|
'email' => ['nullable', 'email', 'max:255'],
|
|
'phone' => ['nullable', 'string', 'max:50'],
|
|
'address' => ['nullable', 'string', 'max:255'],
|
|
'notes' => ['nullable', 'string'],
|
|
];
|
|
}
|
|
}
|