transform([SmartPlaylistRule::class, 'create']), ); } /** @return array */ public function toArray(): array { return [ 'id' => $this->id, 'rules' => $this->rules->toArray(), ]; } }