问题
I just made an e-commerce website in Laravel 5.4. I need to make product filter like size price brand price. I never did this before, so do you have any tutorial or basic tutorial?
回答1:
Laravel where clauses fit you perfectly. Make appropriate database structure and then select products what needed.
Product::where('size', 'XL')->get();
More info from this link https://laravel.com/docs/5.4/queries#where-clauses
If you are new to Laravel then start from here https://laravel.com/docs/5.4/installation
来源:https://stackoverflow.com/questions/45905827/product-filter-with-color-size-price-brand-in-laravel