for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* @author enea dhack <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Enea\Authorization\Operators;
use Enea\Authorization\Contracts\DeniableOwner;
use Illuminate\Support\Collection;
class DeleteDeniedPermissions
{
private $owner;
private $permissions;
public function __construct(DeniableOwner $owner, Collection $permissions)
$this->owner = $owner;
$this->permissions = $permissions;
}
public function make(): void
$this->owner->denied()->detach($this->permissions->pluck('id'));