Database: Query Builder

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
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x