AJAX is use to communicate with the server and perform action like – database manipulation, file upload, etc. without the need to refresh whole page.
AJAX makes easier to load records from MySQL database without reloading the whole page.
Handle AJAX request from the controller and database manipulation in the model.
In this tutorial, I show how you can fetch records from MySQL database with jQuery AJAX in Laravel.
If you are using MySQL database in your web project then there is always possibility that you need to insert, update, and delete records instead of just fetching and displaying records.
In this tutorial, I show how you can insert, update, and delete a record from MySQL database table in Laravel.
A model is a PHP class where perform data logic and database manipulation like – retrieve data, insert, update, and delete.
In Laravel models classes are stored in app/ directory.
This mainly loads from the controller.
In this tutorial, I show how you create and load Model in the controller and fetch records from MySQL database in Laravel.
Laravel follows Model view controller pattern.
- Controller – Interact with Model and view.
- Model – Handles database manipulation.
- View – Display final UI to the user from where it can interact with the application.
Laravel comes with Blade templating engine which makes easier to create pages. Blade view file compiled into plain PHP code.
Blade view files has
You can use PHP code in it.
I am assuming you have already created a Laravel project if not then you can view my earlier tutorial.
In this tutorial, I will create a simple application where pass data to view.
Laravel is a free open-source web development framework which follows Model view controller (MVC) architectural pattern.
It uses Composer to manage its dependencies.
In this tutorial, I show step by step how you can install Laravel on your Windows system.