for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Permission\Traits;
use Illuminate\Database\Eloquent\Model;
use Spatie\Permission\PermissionRegistrar;
trait RefreshesPermissionCache
{
public static function bootRefreshesPermissionCache()
static::created(function (Model $model) {
$model
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
app(PermissionRegistrar::class)->forgetCachedPermissions();
});
static::updated(function (Model $model) {
static::deleted(function (Model $model) {
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.