use reserved slugs
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Concerns;
|
||||
|
||||
trait ReservedSlugs
|
||||
{
|
||||
public function isReserved(string $slug): bool
|
||||
{
|
||||
return in_array($slug, $this->reservedSlugs());
|
||||
}
|
||||
|
||||
public function reservedSlugs(): array
|
||||
{
|
||||
return [
|
||||
'index',
|
||||
'edit',
|
||||
'update',
|
||||
'create',
|
||||
'store',
|
||||
'delete',
|
||||
'destroy',
|
||||
'revoke',
|
||||
'invite',
|
||||
'accept',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user