ldc-supportweb/app/Http/Requests/Bo/Labels/UpdateLabelRequest.php
2023-08-14 09:23:39 +00:00

18 lines
414 B
PHP

<?php
namespace App\Http\Requests\Bo\Labels;
class UpdateLabelRequest extends StoreLabelRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return array_merge(parent::rules(), [
'name' => 'required|string|min:2|max:255|unique:labels,name,' . $this->route('label')->id . ',id',
]);
}
}