Answer the question
In order to leave comments, you need to log in
How to display data from two tables in Laravel?
There is a table with categories (id, name)
There is a table with products (id, name, price,attr)
There is a table with assigned categories (id, product_id, category_id)
How to add a category parameter?
$take = 10;
$offset = $request->offset;
$cat = $request->category; //array
$price = $request->price;
$attr = $request->attr;
$places = Place::where()->orderBy('price', 'desc')->skip($offset)->take($take)->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question