REFACTORING #1880 @4h30m: another ugly refactoring commit
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\CMS\Contracts\Repositories\Content;
|
||||
use App\Http\Requests;
|
||||
use App\Models\Content\Content;
|
||||
|
||||
class Sitemap extends Controller
|
||||
{
|
||||
@@ -30,14 +30,13 @@ class Sitemap extends Controller
|
||||
public function getMap()
|
||||
{
|
||||
// load all public pages
|
||||
$pages = $this->content->getPageQuery()
|
||||
->get();
|
||||
$pages = $this->content->all();
|
||||
|
||||
// iterate over all pages and add tag for each of them
|
||||
foreach ($pages as $page) {
|
||||
|
||||
// is this page a homepage? because of URL
|
||||
if ($page->is_homepage) {
|
||||
if ($page->isHomepage) {
|
||||
$route = route('page.index');
|
||||
$priority = 1;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user