invert query from offers->articles to articles->offers
This commit is contained in:
@@ -6,11 +6,6 @@ use App\Repositories\Core\Arrays;
|
||||
|
||||
class Categories
|
||||
{
|
||||
public static function getTree($withFolder = false)
|
||||
{
|
||||
$categories = self::getCategoryTree()->toArray();
|
||||
return self::getChildren($categories[0]['children'], $withFolder);
|
||||
}
|
||||
|
||||
public static function getFancyTree()
|
||||
{
|
||||
@@ -20,6 +15,12 @@ class Categories
|
||||
return $categories;
|
||||
}
|
||||
|
||||
public static function getTree($withFolder = false)
|
||||
{
|
||||
$categories = self::getCategoryTree()->toArray();
|
||||
return self::getChildren($categories[0]['children'], $withFolder);
|
||||
}
|
||||
|
||||
public static function getCategoryTree()
|
||||
{
|
||||
return self::getModel()->defaultOrder()->get()->toTree();
|
||||
|
||||
Reference in New Issue
Block a user