Answer the question
In order to leave comments, you need to log in
How to apply filters in a model in Laravel?
Hello everyone, I have a table with goods "items"
-id
-name
-shop_id
AND a related many-to-one table "shops"
-id
-name
-delivery
-city
A lookup table "cities"
-id
-name
AND a table with links one-to-one "reference_city"
-id
-shop_id
-city_id
There are the same 2 tables for delivery
The product catalog has fields with filters. Display products by city (city), type of delivery (delivery)
How to search in laravel when all table data is not in one place
Answer the question
In order to leave comments, you need to log in
The question is voluminous and very implementation dependent.
Laravel is a framework, not a CMS, all business logic is done by hand.
You can study the issue in this order:
1. Relationships of models
2. Working with the database
After reading these 2 sections, you can get an understanding of how it can work, and then understand how it is implemented in the current project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question