Files
Document-Management-System-…/vendor/spatie/laravel-permission/src/Exceptions/RoleDoesNotExist.php

19 lines
398 B
PHP
Raw Normal View History

2021-04-07 19:25:18 -04:00
<?php
namespace Spatie\Permission\Exceptions;
use InvalidArgumentException;
class RoleDoesNotExist extends InvalidArgumentException
{
public static function named(string $roleName)
{
return new static("There is no role named `{$roleName}`.");
}
public static function withId(int $roleId)
{
return new static("There is no role with id `{$roleId}`.");
}
}