/** * Remove selected role. * * @param \Yajra\Acl\Models\Role $role * @return \Illuminate\Http\RedirectResponse */ public function destroy(Role $role) { if (!$role->system) { try { $role->delete(); return $this->notifySuccess('Role successfully deleted!'); } catch (QueryException $e) { return $this->notifyError($e->getMessage()); } } return $this->notifyError('Role is protected and cannot be deleted!'); }