check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $this->name_md5 = md5($this->name); return [ 'name' => ['required', 'max:255', new UniqueName('directors', 'name', 'name_md5', 'id', $this->id)], 'slug' => 'max:255|unique:directors,slug,' . $this->id . ',id', ]; } /** * Get the validation attributes that apply to the request. * * @return array */ public function attributes() { return [ // ]; } /** * Get the validation messages that apply to the request. * * @return array */ public function messages() { return [ // ]; } }