Files
Document-Management-System-…/vendor/spatie/laravel-permission/src/Exceptions/GuardDoesNotMatch.php
2021-04-07 19:25:18 -04:00

15 lines
408 B
PHP

<?php
namespace Spatie\Permission\Exceptions;
use InvalidArgumentException;
use Illuminate\Support\Collection;
class GuardDoesNotMatch extends InvalidArgumentException
{
public static function create(string $givenGuard, Collection $expectedGuards)
{
return new static("The given role or permission should use guard `{$expectedGuards->implode(', ')}` instead of `{$givenGuard}`.");
}
}