for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xetaravel\Models;
use Ultraware\Roles\Contracts\RoleHasRelations as RoleHasRelationsContract;
use Ultraware\Roles\Traits\RoleHasRelations;
use Ultraware\Roles\Traits\Slugable;
class Role extends Model implements RoleHasRelationsContract
{
use Slugable, RoleHasRelations;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'slug',
'description',
'level'
];
* The "booting" method of the model.
* @return void
protected static function boot()
parent::boot();
// Generated the slug before updating.
static::updating(function ($model) {
$model->setSlugAttribute($model->name);
});
}