[WIP] Add thumb on offers, refactor categories, try to fix counter on relations polymorphic with eage loader, bad pattern !
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Categories;
|
||||
use App\Repositories\Shop\Offers;
|
||||
use App\Repositories\Shop\Tags;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
@@ -18,8 +19,11 @@ class CategoryController extends Controller
|
||||
public function show($id)
|
||||
{
|
||||
$data = self::init();
|
||||
$data['category'] = Categories::getByCategory($id)->toArray();
|
||||
$data['offers'] = Offers::getByCategory($id)->toArray();
|
||||
$data['category'] = Categories::getFull($id);
|
||||
$data['offers'] = Offers::getByCategoryWithTags($id);
|
||||
$data['tags'] = Tags::getWithCountOffers();
|
||||
dump($data);
|
||||
exit;
|
||||
return view('Shop.shelve', $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user