mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
sort
This commit is contained in:
@@ -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),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user