refactor sitemap generation and navigation handling; remove old GenerateSitemap command, update to use tasks for better organization, and enhance navigation data retrieval
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Containers\AppStructure\Tasks;
|
||||
|
||||
use App\Containers\AppStructure\Models\Page;
|
||||
|
||||
class GetPagesForSitemapTask
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
return Page::query()
|
||||
->where('is_visible', true)
|
||||
->where('code', 200)
|
||||
->where('path', '!=', null)
|
||||
->where('is_url', false)
|
||||
->where('title', '!=', null)
|
||||
->where('searchable', true)
|
||||
->get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user