MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Database: Query Builder

LaravelWebsites

In this we will learn how to use database query in the controller. First of all we need to import database class by mentioning:

use DB;

By importing DB class we can execute data through controller. Now we need to make a function in the controller and insert the values.

Then in the blade view we need to call the values:

Now we can serve the local server php artisan serve and we can see the details provided in the database.

You can see the demonstration in the video given below:

Joydeep M
Latest posts by Joydeep M (see all)
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x