Stevemo\Cpanel\Permission\Repo\PermissionRepository::delete PHP Method

delete() public method

Delete a permission from storage
Author: Steve Montambeault
public delete ( $id ) : boolean
$id
return boolean
    public function delete($id)
    {
        try {
            $perm = $this->model->findOrFail($id);
            $oldData = $perm;
            $perm->delete();
            $this->event->fire('permissions.delete', array($oldData));
            return true;
        } catch (ModelNotFoundException $e) {
            return false;
        }
    }