20 lines
355 B
PHP
20 lines
355 B
PHP
<?php
|
|
namespace App\Exceptions;
|
|
use Exception;
|
|
|
|
class PermissionException extends Exception
|
|
{
|
|
protected $role;
|
|
public function __construct($role)
|
|
{
|
|
parent::__construct("Current user does not have role '{$role}' on this domain");
|
|
$this->role = $role;
|
|
}
|
|
|
|
public function role()
|
|
{
|
|
return $this->role;
|
|
}
|
|
|
|
|
|
} |