Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

πŸš— You set the rental price
πŸ” Secure bookings with verified renters
πŸ“ Track your vehicle with GPS integration
πŸ’° Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

Laravel – select dropdowns that filter results in a table ‘on change’

Hello,
I am working on an application that is kind of an eCommerce application that have a table of product and I want to add a filter that shows the products accordingly like, Product Category, price range, etc, and for that, I’m using a drop-down selector to filter the data and show it – without the user having to click on a submit button – and the results to be displayed automatically to the page. But I cannot seem to find a way to pass the “id”

the parameter to the laravel route (contained in the form action), which saves the option that the user chooses in the select dropdown.

I figure out that it’s possible if we use an ajax call to the database and show results according to the selected id, and also we can edit delete the products using same process of calling the product id,

This is my code uses JQuery to submit the form on menu change. Index.php

This is my routes file: // web.php (routes)

Route::get('/tours-dropdown/{id}', ['as' => 'bookings.toursDropDown', 'uses' => 'BookingsController@toursDropDownData']);Code language: PHP (php)

This is the file that runs the query and returns a result set to the view: //ProductController.php

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.