Add parameters to display by rows
This commit is contained in:
@@ -16,9 +16,11 @@ class HomeController extends Controller
|
||||
// $this->middleware('auth');
|
||||
}
|
||||
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
$input = $request->input();
|
||||
$data = self::init();
|
||||
$data['display_by_rows'] = $input['by_rows'] ?? false;
|
||||
// $data['offers'] = Offers::getLast()->toArray();
|
||||
$data['articles'] = Articles::getArticlesToSell();
|
||||
// $data['prices'] = $data['articles']['offers'][0]['tariff']['price_lists'][0]['price_list_values'][0];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@if ($display_by_rows ?? true)
|
||||
@if ($display_by_rows ?? false)
|
||||
@include('Shop.layout.partials.category_articles_rows')
|
||||
@else
|
||||
@include('Shop.layout.partials.category_articles')
|
||||
|
||||
Reference in New Issue
Block a user