roles === UserRoles::superadmin()->value || Auth::user()->roles === UserRoles::admin()->value); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'notif_name' => 'min:5|required', 'notif_email' => [ 'required', Rule::unique('notification')->where(function ($query) { return $query->where('notif_campId', $this->campaign->camp_id); }), ] ]; } }