ldc-com-app-bo/app/Http/Requests/Api/Contacts/DestroyContactsRequest.php
2023-08-29 11:39:46 +02:00

44 lines
912 B
PHP

<?php
namespace App\Http\Requests\Api\Contacts;
use Illuminate\Foundation\Http\FormRequest;
class DestroyContactsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
// * Check is done with api.token middleware
return true;
}
/**
* Prepare the data for validation.
*
* @return void
*/
protected function prepareForValidation()
{
$this->merge([
'contactUuidList' => \collect($this->contactUuidList)->filter()->all()
]);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'contactUuidList' => 'required|array',
'contactUuidList.*' => 'required|uuid',
];
}
}