'Einundzwanzig School', 'key' => config('feeds.services.podcastindex-org.key'), 'secret' => config('feeds.services.podcastindex-org.secret'), ]); $podcast = $client->podcasts->byFeedUrl('https://einundzwanzig.space/feed.xml') ->json(); $einundzwanzigPodcast = Podcast::query() ->updateOrCreate(['guid' => $podcast->feed->podcastGuid], [ 'title' => $podcast->feed->title, 'link' => $podcast->feed->link, 'language_code' => $podcast->feed->language, 'data' => $podcast->feed, 'created_by' => 1, ]); $episodes = $client->episodes->byFeedUrl('https://einundzwanzig.space/feed.xml') ->json(); foreach ($episodes->items as $item) { Episode::query() ->updateOrCreate(['guid' => $item->guid], [ 'podcast_id' => $einundzwanzigPodcast->id, 'data' => $item, 'created_by' => 1, ]); } return Command::SUCCESS; } }