This commit is contained in:
Benjamin Takats
2023-01-18 17:33:48 +01:00
parent 5513d680c5
commit 702057650e
2 changed files with 3 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Console\Commands\Feed;
use App\Models\Episode; use App\Models\Episode;
use App\Models\Podcast; use App\Models\Podcast;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
class ReadAndSyncEinundzwanzigPodcastFeed extends Command class ReadAndSyncEinundzwanzigPodcastFeed extends Command
{ {
@@ -50,6 +51,7 @@ class ReadAndSyncEinundzwanzigPodcastFeed extends Command
'podcast_id' => $einundzwanzigPodcast->id, 'podcast_id' => $einundzwanzigPodcast->id,
'data' => $item, 'data' => $item,
'created_by' => 1, 'created_by' => 1,
'created_at' => Carbon::parse($item->datePublished),
]); ]);
} }

View File

@@ -27,7 +27,7 @@ class Episode extends Resource
public static $search = [ public static $search = [
'id', 'id',
]; ];
public static $orderBy = ['data->datePublished' => 'desc']; public static $orderBy = ['created_at' => 'desc'];
public static function afterUpdate(NovaRequest $request, Model $model) public static function afterUpdate(NovaRequest $request, Model $model)
{ {