mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-01 08:16:55 -04:00
11 lines
253 B
PHP
11 lines
253 B
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
|
|
if (!function_exists('checkUserPermission')) {
|
|
function checkUserPermission(User $user, string $permission): bool
|
|
{
|
|
return $user->role->permissions()->where('route', $permission)->exists();
|
|
}
|
|
}
|