Add display of shelve
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Shop;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\Categories;
|
||||
use App\Repositories\Shop\Offers;
|
||||
use App\Repositories\Shop\Tags;
|
||||
@@ -17,15 +18,14 @@ class CategoryController extends Controller
|
||||
return $dataTable->render('Shop.Categories.list');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
public function show($category_id)
|
||||
{
|
||||
$data = self::init();
|
||||
$data['category'] = Categories::getFull($id);
|
||||
$data['offers'] = Offers::getByCategoryWithTags($id);
|
||||
$data['tags'] = Tags::getWithCountOffers();
|
||||
$data['tags2'] = TagGroups::getWithTagsAndCountOffers();
|
||||
dump($data);
|
||||
exit;
|
||||
$data['category'] = Categories::getFull($category_id);
|
||||
$data['articles'] = Articles::getArticlesToSell($category_id);
|
||||
$data['tags'] = TagGroups::getWithTagsAndCountOffers();
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Shop.shelve', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,7 @@ class HomeController extends Controller
|
||||
$input = $request->input();
|
||||
$data = self::init();
|
||||
$data['display_by_rows'] = $input['by_rows'] ?? false;
|
||||
// $data['offers'] = Offers::getLast()->toArray();
|
||||
$data['articles'] = Articles::getArticlesToSell();
|
||||
// $data['tags'] = Tags::getWithCountOffers();
|
||||
$data['tags'] = TagGroups::getWithTagsAndCountOffers();
|
||||
return view('Shop.home', $data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user