diff --git a/app/Console/Commands/Feed/ReadAndSyncEinundzwanzigPodcastFeed.php b/app/Console/Commands/Feed/ReadAndSyncEinundzwanzigPodcastFeed.php index 4c2887b9..2b2f4c90 100644 --- a/app/Console/Commands/Feed/ReadAndSyncEinundzwanzigPodcastFeed.php +++ b/app/Console/Commands/Feed/ReadAndSyncEinundzwanzigPodcastFeed.php @@ -5,6 +5,7 @@ namespace App\Console\Commands\Feed; use App\Models\Episode; use App\Models\Podcast; use Illuminate\Console\Command; +use Illuminate\Support\Carbon; class ReadAndSyncEinundzwanzigPodcastFeed extends Command { @@ -50,6 +51,7 @@ class ReadAndSyncEinundzwanzigPodcastFeed extends Command 'podcast_id' => $einundzwanzigPodcast->id, 'data' => $item, 'created_by' => 1, + 'created_at' => Carbon::parse($item->datePublished), ]); } diff --git a/app/Nova/Episode.php b/app/Nova/Episode.php index c2cd50cd..f256a0b1 100644 --- a/app/Nova/Episode.php +++ b/app/Nova/Episode.php @@ -27,7 +27,7 @@ class Episode extends Resource public static $search = [ 'id', ]; - public static $orderBy = ['data->datePublished' => 'desc']; + public static $orderBy = ['created_at' => 'desc']; public static function afterUpdate(NovaRequest $request, Model $model) {