Laravel 10 Tutorial #91 | Product Filter in Laravel (I) | Product Sort by Price | Refresh of Page

Laravel 10 Tutorial #91 | Product Filter in Laravel (I) | Product Sort by Price | Refresh of Page

Stack Developers

8 месяцев назад

766 Просмотров

►Laravel 10 Tutorial Playlist: https://www.youtube.com/playlist?list=PLLUtELdNs2ZbX7T5wgbBR9wUXt5YPG-hm

In Part 91 of the Laravel 10 Tutorial to make the E-commerce Website in Laravel, we will start working on a Product filter to sort the products by lowest and highest price, newest items, best selling, featured items and discounted items.

We will do Sort by Filter in 2 ways:-
1) With Refresh of Page
2) Without Refresh of Page via Ajax

In this video, we will do a product filter with a refresh of the page without Ajax.

1) Update listing.blade.php file :-
First of all, we will update "Sort By" select box with below options :-
Newest Items
Best Selling
Lowest Price
Highest Price
Featured Items
Discounted Items

We will also update sort by form id and name with sortProducts.

2) Create custom.js :-
Now we will create custom.js file for front like we have created custom.js for admin.

In custom.js file, we will add jquery to submit Sort by form with change event that works every time when sort option selected.

3) Update layout.blade.php file :-
Now include newly created custom.js file at layout.blade.php

4) Update listing function :-
Now we need to update listing function to update query with sort option if selected.

5) Update listing.blade.php file :-
Finally, we require to update listing file to appends option of paging that append the pagination links with query string like sort.

Also, update sortProducts form to show the selected sort option in Sort By select drop down.

Thanks for watching :)

►Click here to subscribe for Laravel & other updates - https://www.youtube.com/stackdevelopers

Popular Stack Developers Series that can help you:-

►Laravel Multi-Vendor E-commerce Website - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYTlQ97V1Tl8mirS3qXHNFZ

►React JS Tutorial for Beginners with Laravel - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYnEIWliBpU98gtorNRNHw1

►Laravel Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZaHaFmydqjcQ-YyeQ19Cd6u

►GIT Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZVQ-dLOMFWvmCCduzJ8c6R

►Laravel API Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbcCsd4yAAiBU2L3ROREk8P

►Laravel Interview Questions - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbzB_1Jdp_yFcORwOfWP8RU

►jQuery Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbMYoUA46GIonOH29KcjtxA

►Laravel Basic E-commerce Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZY5drPxIWzpq5crhantlzp7

►Laravel Dating Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZrPUnxjlomErJfNvkyS6Hf

►Join this channel to get the complete source code of all series:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join

Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - http://facebook.com/stackdevelopers2/
►Join Facebook Group to resolve your queries - http://facebook.com/groups/stackdevelopers
►Follow on Instagram - https://www.instagram.com/stackdevelopers2/
►Follow on GitHub - https://github.com/stackdevelopers

#laravel10 #laravel10tutorial #laravel

Тэги:

#laravel_10 #laravel_10_tutorial #make_admin_panel_in_laravel_10 #laravel_admin_panel #create_admin_in_laravel #admin_panel_laravel #make_admin_laravel #make_ecommerce_admin_laravel #laravel_10_ecommerce #products_module #create_admin_panel_in_php #create_products_table #products_laravel #images_laravel
Ссылки и html тэги не поддерживаются


Комментарии: