This commit is contained in:
F4ilji
2026-03-20 21:47:02 +05:00
parent ae7b42acbe
commit a3948c872e
1926 changed files with 2630 additions and 270 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Containers\Dashboard\Tasks;
use App\Containers\Article\Models\Post;
use Illuminate\Database\Eloquent\Collection;
class GetDraftPostsTask
{
public function run(): Collection
{
return Post::query()
->with(['category', 'author'])
->whereNull('publish_at')
->orderBy('created_at', 'desc')
->get([
'id',
'title',
'slug',
'preview_text',
'content',
'status',
'authors',
'preview',
'images',
'reading_time',
'category_id',
'created_at',
'updated_at',
]);
}
}