Skip to content

Commit a7d9a52

Browse files
committed
chore: add exception for invalid group method
1 parent dd61574 commit a7d9a52

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Sukristyan\LaravelMenuWrapper\Exceptions;
4+
5+
use InvalidArgumentException;
6+
7+
class InvalidGroupException extends InvalidArgumentException
8+
{
9+
public static function create(string $given, array $expect)
10+
{
11+
$implode = implode(', ', $expect);
12+
return new static("The given role or permission should use guard `{$implode}` instead of `{$given}`.");
13+
}
14+
}

0 commit comments

Comments
 (0)