*/ protected $fillable = [ 'name', 'permissions', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'permissions' => 'array', ]; public function users() { return $this->belongsToMany(User::class); } }