REFACTORING #1880 @4h30m: another ugly refactoring commit

This commit is contained in:
Michal Kváček
2016-10-25 16:50:04 +02:00
parent 28f67ffe3c
commit cc999dd24e
71 changed files with 827 additions and 608 deletions
+3 -4
View File
@@ -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 {