Esempio n. 1
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     /** @var \Arcanesoft\Auth\Models\Role $role */
     $role = $this->route('auth_role');
     return array_merge(parent::rules(), ['slug' => "required|min:3|unique:roles,slug,{$role->id}"]);
 }
Esempio n. 2
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['slug' => 'required|min:3|unique:roles,slug']);
 }