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