for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\LaravelAuth\Listeners\Roles;
use Arcanedev\LaravelAuth\Events\Roles\DeletingRole;
/**
* Class DetachingPermissions
*
* @package Arcanedev\LaravelAuth\Listeners\Roles
* @author ARCANEDEV <[email protected]>
*/
class DetachingPermissions
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Handle the event.
* @param \Arcanedev\LaravelAuth\Events\Roles\DeletingRole $event
* @return boolean
public function handle(DeletingRole $event)
$event->role->detachAllPermissions(false);
}