repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Exceptions/WildcardPermissionNotProperlyFormatted.php
src/Exceptions/WildcardPermissionNotProperlyFormatted.php
<?php namespace Spatie\Permission\Exceptions; use InvalidArgumentException; class WildcardPermissionNotProperlyFormatted extends InvalidArgumentException { public static function create(string $permission) { return new static(__('Wildcard permission `:permission` is not properly formatted.', [ ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Exceptions/PermissionAlreadyExists.php
src/Exceptions/PermissionAlreadyExists.php
<?php namespace Spatie\Permission\Exceptions; use InvalidArgumentException; class PermissionAlreadyExists extends InvalidArgumentException { public static function create(string $permissionName, string $guardName) { return new static(__('A `:permission` permission already exists for guard `:guard`.',...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Exceptions/RoleAlreadyExists.php
src/Exceptions/RoleAlreadyExists.php
<?php namespace Spatie\Permission\Exceptions; use InvalidArgumentException; class RoleAlreadyExists extends InvalidArgumentException { public static function create(string $roleName, string $guardName) { return new static(__('A role `:role` already exists for guard `:guard`.', [ 'role' =>...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Traits/HasRoles.php
src/Traits/HasRoles.php
<?php namespace Spatie\Permission\Traits; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Events\Ro...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Traits/HasPermissions.php
src/Traits/HasPermissions.php
<?php namespace Spatie\Permission\Traits; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Contracts...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Traits/RefreshesPermissionCache.php
src/Traits/RefreshesPermissionCache.php
<?php namespace Spatie\Permission\Traits; use Spatie\Permission\PermissionRegistrar; trait RefreshesPermissionCache { public static function bootRefreshesPermissionCache() { static::saved(function () { app(PermissionRegistrar::class)->forgetCachedPermissions(); }); static...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Contracts/Wildcard.php
src/Contracts/Wildcard.php
<?php namespace Spatie\Permission\Contracts; use Illuminate\Database\Eloquent\Model; interface Wildcard { public function __construct(Model $record); public function getIndex(): array; public function implies(string $permission, string $guardName, array $index): bool; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Contracts/Role.php
src/Contracts/Role.php
<?php namespace Spatie\Permission\Contracts; use Illuminate\Database\Eloquent\Relations\BelongsToMany; /** * @property int|string $id * @property string $name * @property string|null $guard_name * * @mixin \Spatie\Permission\Models\Role * * @phpstan-require-extends \Spatie\Permission\Models\Role */ interface...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Contracts/PermissionsTeamResolver.php
src/Contracts/PermissionsTeamResolver.php
<?php namespace Spatie\Permission\Contracts; interface PermissionsTeamResolver { public function getPermissionsTeamId(): int|string|null; /** * Set the team id for teams/groups support, this id is used when querying permissions/roles * * @param int|string|\Illuminate\Database\Eloquent\Model|n...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Contracts/Permission.php
src/Contracts/Permission.php
<?php namespace Spatie\Permission\Contracts; use Illuminate\Database\Eloquent\Relations\BelongsToMany; /** * @property int|string $id * @property string $name * @property string|null $guard_name * * @mixin \Spatie\Permission\Models\Permission * * @phpstan-require-extends \Spatie\Permission\Models\Permission ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Middleware/RoleMiddleware.php
src/Middleware/RoleMiddleware.php
<?php namespace Spatie\Permission\Middleware; use Closure; use Illuminate\Support\Facades\Auth; use Spatie\Permission\Exceptions\UnauthorizedException; use Spatie\Permission\Guard; class RoleMiddleware { public function handle($request, Closure $next, $role, $guard = null) { $authGuard = Auth::guard(...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Middleware/RoleOrPermissionMiddleware.php
src/Middleware/RoleOrPermissionMiddleware.php
<?php namespace Spatie\Permission\Middleware; use Closure; use Illuminate\Support\Facades\Auth; use Spatie\Permission\Exceptions\UnauthorizedException; use Spatie\Permission\Guard; class RoleOrPermissionMiddleware { public function handle($request, Closure $next, $roleOrPermission, $guard = null) { $...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Middleware/PermissionMiddleware.php
src/Middleware/PermissionMiddleware.php
<?php namespace Spatie\Permission\Middleware; use Closure; use Illuminate\Support\Facades\Auth; use Spatie\Permission\Exceptions\UnauthorizedException; use Spatie\Permission\Guard; class PermissionMiddleware { public function handle($request, Closure $next, $permission, $guard = null) { $authGuard = ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Models/Role.php
src/Models/Role.php
<?php namespace Spatie\Permission\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Spatie\Permission\Contracts\Role as RoleContract; use Spatie\Permission\Exceptions\GuardDoesNotMatch; use Spatie\Permission\Exceptions\PermissionDoesNotExist; use Spatie\Perm...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Models/Permission.php
src/Models/Permission.php
<?php namespace Spatie\Permission\Models; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Spatie\Permission\Contracts\Permission as PermissionContract; use Spatie\Permission\Exceptions\PermissionAlreadyExists; use Spati...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/CreatePermission.php
src/Commands/CreatePermission.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Spatie\Permission\Contracts\Permission as PermissionContract; class CreatePermission extends Command { protected $signature = 'permission:create-permission {name : The name of the permission} {guard?...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/CacheReset.php
src/Commands/CacheReset.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Spatie\Permission\PermissionRegistrar; class CacheReset extends Command { protected $signature = 'permission:cache-reset'; protected $description = 'Reset the permission cache'; public function handle() { $permi...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/AssignRole.php
src/Commands/AssignRole.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Spatie\Permission\Contracts\Role as RoleContract; class AssignRole extends Command { protected $signature = 'permission:assign-role {name : The name of the role} {userId : The ID of the user to assign the role to} ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/Show.php
src/Commands/Show.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Permission as PermissionContract; use Spatie\Permission\Contracts\Role as RoleContract; use Symfony\Component\Console\Helper\TableCell; class Show extends Command { prote...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/UpgradeForTeams.php
src/Commands/UpgradeForTeams.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\Config; class UpgradeForTeams extends Command { protected $signature = 'permission:setup-teams'; protected $description = 'Setup the teams feature by generating the associated migration.'; protect...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Commands/CreateRole.php
src/Commands/CreateRole.php
<?php namespace Spatie\Permission\Commands; use Illuminate\Console\Command; use Spatie\Permission\Contracts\Permission as PermissionContract; use Spatie\Permission\Contracts\Role as RoleContract; use Spatie\Permission\PermissionRegistrar; class CreateRole extends Command { protected $signature = 'permission:crea...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Events/PermissionAttached.php
src/Events/PermissionAttached.php
<?php declare(strict_types=1); namespace Spatie\Permission\Events; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Permission...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Events/RoleAttached.php
src/Events/RoleAttached.php
<?php declare(strict_types=1); namespace Spatie\Permission\Events; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Role; cla...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Events/RoleDetached.php
src/Events/RoleDetached.php
<?php declare(strict_types=1); namespace Spatie\Permission\Events; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Role; cla...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/src/Events/PermissionDetached.php
src/Events/PermissionDetached.php
<?php declare(strict_types=1); namespace Spatie\Permission\Events; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; use Spatie\Permission\Contracts\Permission...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/HasRolesTest.php
tests/HasRolesTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Event; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Contracts\Rol...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
true
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/HasPermissionsTest.php
tests/HasPermissionsTest.php
<?php namespace Spatie\Permission\Tests; use DB; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Event; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Ev...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
true
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/PermissionRegistrarTest.php
tests/PermissionRegistrarTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission as PermissionContract; use Spatie\Permission\Contracts\Role as RoleContract; use Spatie\Permission\Models\Permission as SpatiePermission; use Spatie\Permission\Models\Role as SpatieRole; use Spat...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/CustomGateTest.php
tests/CustomGateTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Contracts\Auth\Access\Gate; use PHPUnit\Framework\Attributes\Test; class CustomGateTest extends TestCase { protected function getEnvironmentSetUp($app) { parent::getEnvironmentSetUp($app); $app['config']->set('permission.register_permis...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/CacheTest.php
tests/CacheTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\DB; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Exceptions\PermissionDoesNotExist; use Spatie\Permission\Pe...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/MultipleGuardsTest.php
tests/MultipleGuardsTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Tests\TestModels\Manager; class MultipleGuardsTest extends TestCase { protected function getEnvironm...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/WildcardMiddlewareTest.php
tests/WildcardMiddlewareTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Exceptions\UnauthorizedException; use Spatie\Permission\Middleware\PermissionMiddleware; use Spatie\Permission\Middlewar...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/HasPermissionsWithCustomModelsTest.php
tests/HasPermissionsWithCustomModelsTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\PermissionRegistrar; use Spatie\Permission\Tests\TestModels\Admin; use Spatie\Permission\Tests\TestModels\Permission; use Spatie\Permission\Tests\Test...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/RoleOrPermissionMiddlewareTest.php
tests/RoleOrPermissionMiddlewareTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Gate; use InvalidArgumentException; use Laravel\Passport\Passport; use PHPUnit\Framework\Attributes\Test; use S...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestCase.php
tests/TestCase.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Schema\Blueprint; use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use Illumina...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/RoleWithNestingTest.php
tests/RoleWithNestingTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Tests\TestModels\Role; class RoleWithNestingTest extends TestCase { /** @var bool */ protected $useCustomModels = true; /** @var Role[] */ protected ar...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/GateTest.php
tests/GateTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Contracts\Auth\Access\Gate; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; class GateTest extends TestCase { /** @test */ #[Test] public function it_can_determine_if_a...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/WildcardHasPermissionsTest.php
tests/WildcardHasPermissionsTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Exceptions\PermissionDoesNotExist; use Spatie\Permission\Exceptions\WildcardPermissionInvalidArgument; use Spatie\Permission\Exceptions\WildcardPermissionNotProperlyForma...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/RoleTest.php
tests/RoleTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Exceptions\GuardDoesNotMatch; use Spatie\Permission\Exceptions\PermissionDoesNotExist; use Spatie\Permission\Exceptions\RoleAlreadyExists; use Spatie\Permission\Exceptions\RoleDo...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/PolicyTest.php
tests/PolicyTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Contracts\Auth\Access\Authorizable; use Illuminate\Contracts\Auth\Access\Gate; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Tests\TestModels\Content; class PolicyTest extends TestCase { /** @test */ #[Test] public function policy_met...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestHelper.php
tests/TestHelper.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Http\Response; use Symfony\Component\HttpKernel\Exception\HttpException; class TestHelper { /** * @param string $middleware * @param object $parameter * @return int */ public function testMiddleware($...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/RouteTest.php
tests/RouteTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Tests\TestModels\TestRolePermissionsEnum; class RouteTest extends TestCase { /** @test */ #[Test] public function test_role_function() { $router ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/WildcardRouteTest.php
tests/WildcardRouteTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; class WildcardRouteTest extends TestCase { /** @test */ #[Test] public function test_permission_function() { app('config')->set('permission.enable_wildcard_permission', true); $router = $this->getRouter()...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/CommandTest.php
tests/CommandTest.php
<?php namespace Spatie\Permission\Tests; use Composer\InstalledVersions; use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Support\Facades\Artisan; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; use Spatie\Permission\Tests\TestModels\Use...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TeamHasPermissionsTest.php
tests/TeamHasPermissionsTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Tests\TestModels\User; class TeamHasPermissionsTest extends HasPermissionsTest { /** @var bool */ protected $hasTeams = true; /** @test */ #[Test] public function it_can_assign_same_and_differen...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/RoleMiddlewareTest.php
tests/RoleMiddlewareTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Config; use InvalidArgumentException; use Laravel\Passport\Passport; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Role; use ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/HasRolesWithCustomModelsTest.php
tests/HasRolesWithCustomModelsTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Tests\TestModels\Admin; use Spatie\Permission\Tests\TestModels\Role; class HasRolesWithCustomModelsTest extends HasRolesTest { /** @var bool */ ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/WildcardRoleTest.php
tests/WildcardRoleTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Models\Permission; class WildcardRoleTest extends TestCase { protected function setUp(): void { parent::setUp(); app('config')->set('permission.enable_wildcard_permission', true); P...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/BladeTest.php
tests/BladeTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Support\Facades\Artisan; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Role; class BladeTest extends TestCase { protected function setUp(): void { parent::setUp(); $roleModel = app(Role::class); $roleMo...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TeamHasRolesTest.php
tests/TeamHasRolesTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Role; use Spatie\Permission\Tests\TestModels\User; class TeamHasRolesTest extends HasRolesTest { /** @var bool */ protected $hasTeams = true; /** @test */ #[Test] public function it_de...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/PermissionTest.php
tests/PermissionTest.php
<?php namespace Spatie\Permission\Tests; use PHPUnit\Framework\Attributes\Test; use Spatie\Permission\Contracts\Permission; use Spatie\Permission\Exceptions\PermissionAlreadyExists; use Spatie\Permission\Tests\TestModels\User; class PermissionTest extends TestCase { /** @test */ #[Test] public function i...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/PermissionMiddlewareTest.php
tests/PermissionMiddlewareTest.php
<?php namespace Spatie\Permission\Tests; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Gate; use InvalidArgumentException; use Laravel\Passport\Passport; use PHPUnit\Framework\Attributes\Test; use S...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/WildcardPermission.php
tests/TestModels/WildcardPermission.php
<?php namespace Spatie\Permission\Tests\TestModels; use Spatie\Permission\WildcardPermission as BaseWildcardPermission; class WildcardPermission extends BaseWildcardPermission { /** @var string */ public const WILDCARD_TOKEN = '@'; /** @var non-empty-string */ public const PART_DELIMITER = ':'; ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Client.php
tests/TestModels/Client.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Foundation\Auth\Access\Authorizable; use Laravel\Passport\Client as BaseClient; use Spatie\Permission\Traits\HasRoles; class Client extends BaseClient implements AuthorizableC...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/RuntimeRole.php
tests/TestModels/RuntimeRole.php
<?php namespace Spatie\Permission\Tests\TestModels; class RuntimeRole extends \Spatie\Permission\Models\Role { protected $visible = [ 'id', 'name', ]; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/TestRolePermissionsEnum.php
tests/TestModels/TestRolePermissionsEnum.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Support\Str; /** * Enum example * * Syntax is `case NAME = VALUE` * The NAME will be used in your application code * The VALUE will be the role/permission name checked-against in the database. * * NOTE: When creating roles/permissions, you mus...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/User.php
tests/TestModels/User.php
<?php namespace Spatie\Permission\Tests\TestModels; use Spatie\Permission\Traits\HasRoles; class User extends UserWithoutHasRoles { use HasRoles; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Admin.php
tests/TestModels/Admin.php
<?php namespace Spatie\Permission\Tests\TestModels; class Admin extends User { protected $table = 'admins'; protected $touches = ['roles', 'permissions']; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/UserWithoutHasRoles.php
tests/TestModels/UserWithoutHasRoles.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Auth\Authenticatable; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Auth\Access\Au...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Manager.php
tests/TestModels/Manager.php
<?php namespace Spatie\Permission\Tests\TestModels; class Manager extends User { // this function is added here to support the unit tests verifying it works // When present, it takes precedence over the $guard_name property. public function guardName(): string { return 'jwt'; } // int...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Role.php
tests/TestModels/Role.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Str; class Role extends \Spatie\Permission\Models\Role { use SoftDeletes; protected $primaryKey = 'role_test_id'; protected ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/SoftDeletingUser.php
tests/TestModels/SoftDeletingUser.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Database\Eloquent\SoftDeletes; class SoftDeletingUser extends User { use SoftDeletes; protected string $guard_name = 'web'; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Permission.php
tests/TestModels/Permission.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Str; class Permission extends \Spatie\Permission\Models\Permission { use SoftDeletes; protected $primaryKey = 'permission_test_id'; protected $visible = [ 'permission_test_id...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/TestModels/Content.php
tests/TestModels/Content.php
<?php namespace Spatie\Permission\Tests\TestModels; use Illuminate\Database\Eloquent\Model; class Content extends Model { protected $guarded = []; protected $table = 'content'; }
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/hasRole.blade.php
tests/resources/views/hasRole.blade.php
@hasrole($role) has role @else does not have role @endhasrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasRole.blade.php
tests/resources/views/guardHasRole.blade.php
@hasrole($role, $guard) has role @else does not have role @endhasrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/hasAllRoles.blade.php
tests/resources/views/hasAllRoles.blade.php
@hasallroles($roles) does have all of the given roles @else does not have all of the given roles @endhasallroles
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/unlessrole.blade.php
tests/resources/views/unlessrole.blade.php
@unlessrole($role) does not have role @else has role @endunlessrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasAllRoles.blade.php
tests/resources/views/guardHasAllRoles.blade.php
@hasallroles($roles, $guard) does have all of the given roles @else does not have all of the given roles @endhasallroles
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasAllRolesPipe.blade.php
tests/resources/views/guardHasAllRolesPipe.blade.php
@hasallroles("super-admin|moderator", $guard) does have all of the given roles @else does not have all of the given roles @endhasallroles
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardRole.blade.php
tests/resources/views/guardRole.blade.php
@role($role, $guard) has role for guard @else does not have role for guard @endrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasAnyRolePipe.blade.php
tests/resources/views/guardHasAnyRolePipe.blade.php
@hasanyrole("super-admin|moderator", $guard) does have some of the roles @else does not have any of the given roles @endhasanyrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/hasAnyRole.blade.php
tests/resources/views/hasAnyRole.blade.php
@hasanyrole($roles) does have some of the roles @else does not have any of the given roles @endhasanyrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasAllRolesArray.blade.php
tests/resources/views/guardHasAllRolesArray.blade.php
@hasallroles(['super-admin', 'moderator'], $guard) does have all of the given roles @else does not have all of the given roles @endhasallroles
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/role.blade.php
tests/resources/views/role.blade.php
@role($role) has role @elserole($elserole) has else role @else does not have role @endrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardHasAnyRole.blade.php
tests/resources/views/guardHasAnyRole.blade.php
@hasanyrole($roles, $guard) does have some of the roles @else does not have any of the given roles @endhasanyrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/guardunlessrole.blade.php
tests/resources/views/guardunlessrole.blade.php
@unlessrole($role, $guard) does not have role @else has role @endunlessrole
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/can.blade.php
tests/resources/views/can.blade.php
@can($permission, $guard ?? null) has permission @else does not have permission @endcan
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/tests/resources/views/haspermission.blade.php
tests/resources/views/haspermission.blade.php
@haspermission($permission, $guard ?? null) has permission @elsehaspermission($elsepermission, $guard ?? null) has else permission @else does not have permission @endhaspermission
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
spatie/laravel-permission
https://github.com/spatie/laravel-permission/blob/c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044/config/permission.php
config/permission.php
<?php return [ 'models' => [ /* * When using the "HasPermissions" trait from this package, we need to know which * Eloquent model should be used to retrieve your permissions. Of course, it * is often just the "Permission" model but you may use whatever you like. * ...
php
MIT
c9a58b20c656ea6e22b25e6e1b4d3bab0e0ca044
2026-01-04T15:03:01.280769Z
false
blueimp/jQuery-File-Upload
https://github.com/blueimp/jQuery-File-Upload/blob/0e92a4d4613d4ed5231ee0d8513519f2e04f99ba/server/php/UploadHandler.php
server/php/UploadHandler.php
<?php /* * jQuery File Upload Plugin PHP Class * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * https://opensource.org/licenses/MIT */ class UploadHandler { protected $options; // PHP File Upload error me...
php
MIT
0e92a4d4613d4ed5231ee0d8513519f2e04f99ba
2026-01-04T15:02:34.243643Z
true
blueimp/jQuery-File-Upload
https://github.com/blueimp/jQuery-File-Upload/blob/0e92a4d4613d4ed5231ee0d8513519f2e04f99ba/server/php/index.php
server/php/index.php
<?php /* * jQuery File Upload Plugin PHP Example * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * https://opensource.org/licenses/MIT */ error_reporting(E_ALL | E_STRICT); require('UploadHandler.php'); $upload_hand...
php
MIT
0e92a4d4613d4ed5231ee0d8513519f2e04f99ba
2026-01-04T15:02:34.243643Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Run.php
src/Whoops/Run.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops; use InvalidArgumentException; use Throwable; use Whoops\Exception\ErrorException; use Whoops\Handler\CallbackHandler; use Whoops\Handler\Handler; use Whoops\Handler\HandlerInterface; use Whoops\Ins...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/RunInterface.php
src/Whoops/RunInterface.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops; use InvalidArgumentException; use Whoops\Exception\ErrorException; use Whoops\Handler\HandlerInterface; interface RunInterface { const EXCEPTION_HANDLER = "handleException"; const ERROR_HA...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Inspector/InspectorInterface.php
src/Whoops/Inspector/InspectorInterface.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Inspector; interface InspectorInterface { /** * @return \Throwable */ public function getException(); /** * @return string */ public function getExceptionName();...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Inspector/InspectorFactory.php
src/Whoops/Inspector/InspectorFactory.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Inspector; use Whoops\Exception\Inspector; class InspectorFactory implements InspectorFactoryInterface { /** * @param \Throwable $exception * @return InspectorInterface */ pu...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Inspector/InspectorFactoryInterface.php
src/Whoops/Inspector/InspectorFactoryInterface.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Inspector; interface InspectorFactoryInterface { /** * @param \Throwable $exception * @return InspectorInterface */ public function create($exception); }
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/XmlResponseHandler.php
src/Whoops/Handler/XmlResponseHandler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use SimpleXMLElement; use Whoops\Exception\Formatter; /** * Catches an exception and converts it to an XML * response. Additionally can also return exception * frames for consumption by...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/Handler.php
src/Whoops/Handler/Handler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use Whoops\Inspector\InspectorInterface; use Whoops\RunInterface; /** * Abstract implementation of a Handler. */ abstract class Handler implements HandlerInterface { /* Return c...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/CallbackHandler.php
src/Whoops/Handler/CallbackHandler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use InvalidArgumentException; /** * Wrapper for Closures passed as handlers. Can be used * directly, or will be instantiated automagically by Whoops\Run * if passed to Run::pushHandler ...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/PlainTextHandler.php
src/Whoops/Handler/PlainTextHandler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> * Plaintext handler for command line and logs. * @author Pierre-Yves Landuré <https://howto.biapy.com/> */ namespace Whoops\Handler; use InvalidArgumentException; use Psr\Log\LoggerInterface; use Whoops\Exception\Frame; ...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/JsonResponseHandler.php
src/Whoops/Handler/JsonResponseHandler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use Whoops\Exception\Formatter; /** * Catches an exception and converts it to a JSON * response. Additionally can also return exception * frames for consumption by an API. */ class Jso...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/HandlerInterface.php
src/Whoops/Handler/HandlerInterface.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use Whoops\Inspector\InspectorInterface; use Whoops\RunInterface; interface HandlerInterface { /** * @return int|null A handler may return nothing, or a Handler::HANDLE_* constant...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Handler/PrettyPageHandler.php
src/Whoops/Handler/PrettyPageHandler.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Handler; use InvalidArgumentException; use RuntimeException; use Symfony\Component\VarDumper\Cloner\AbstractCloner; use Symfony\Component\VarDumper\Cloner\VarCloner; use UnexpectedValueException; us...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Util/TemplateHelper.php
src/Whoops/Util/TemplateHelper.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Util; use Symfony\Component\VarDumper\Caster\Caster; use Symfony\Component\VarDumper\Cloner\AbstractCloner; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\H...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Util/SystemFacade.php
src/Whoops/Util/SystemFacade.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Util; class SystemFacade { /** * Turns on output buffering. * * @return bool */ public function startOutputBuffering() { return ob_start(); } /** ...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Util/HtmlDumperOutput.php
src/Whoops/Util/HtmlDumperOutput.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Util; /** * Used as output callable for Symfony\Component\VarDumper\Dumper\HtmlDumper::dump() * * @see TemplateHelper::dump() */ class HtmlDumperOutput { private $output; public functio...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Util/Misc.php
src/Whoops/Util/Misc.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Util; class Misc { /** * Can we at this point in time send HTTP headers? * * Currently this checks if we are even serving an HTTP request, * as opposed to running from a comm...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Exception/Frame.php
src/Whoops/Exception/Frame.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Exception; use InvalidArgumentException; use Serializable; class Frame implements Serializable { /** * @var array */ protected $frame; /** * @var string */ prot...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false
filp/whoops
https://github.com/filp/whoops/blob/67342bc807854844244f219fb74687fdf2f62e00/src/Whoops/Exception/FrameCollection.php
src/Whoops/Exception/FrameCollection.php
<?php /** * Whoops - php errors for cool kids * @author Filipe Dobreira <http://github.com/filp> */ namespace Whoops\Exception; use ArrayAccess; use ArrayIterator; use Countable; use IteratorAggregate; use ReturnTypeWillChange; use Serializable; use UnexpectedValueException; /** * Exposes a fluent interface for ...
php
MIT
67342bc807854844244f219fb74687fdf2f62e00
2026-01-04T15:02:56.580125Z
false