'int', 'rules' => 'array', ]; protected $appends = ['is_smart']; public function songs(): BelongsToMany { return $this->belongsToMany(Song::class); } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function getIsSmartAttribute(): bool { return (bool) $this->rules; } }