X

Create New Item

File Folder

X

Search Results

File "GuardDoesNotMatch.php"

Full path: /home/orbitecv/orbite-school.orbit.et/vendor/spatie/laravel-permission/src/Exceptions/GuardDoesNotMatch.php
File size: 489 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php

namespace Spatie\Permission\Exceptions;

use Illuminate\Support\Collection;
use InvalidArgumentException;

class GuardDoesNotMatch extends InvalidArgumentException
{
    public static function create(string $givenGuard, Collection $expectedGuards)
    {
        return new static(__('The given role or permission should use guard `:expected` instead of `:given`.', [
            'expected' => $expectedGuards->implode(', '),
            'given' => $givenGuard,
        ]));
    }
}