laravel logo - ExtJS 4 and Laravel 4 CRUD tutorial

ExtJS 4 and Laravel 4 CRUD tutorial

Posted on

laravel logo - ExtJS 4 and Laravel 4 CRUD tutorial

Ever since I have posted ExtJS 4 MVC CRUD tutorial, I got hundreds of request on writing the same example with PHP so I have decided to post a same article with Laravel. Those who are not familiar with Laravel should know that it’s a PHP MVC framework. Compare to Spring framework, I find very fast and easy to develop in Laravel because of Its controller, routes and Eloquent. So let’s start with Laravel first.

Download and install Laravel on your machine. I am using Laravel 4.2 version and installed it using composer.

First steps is to create a books table on DB. You can use Laravel migration or JefferyWay’s Generator class to generate table. If you are not familiar either of those then don’t worry, execute the following sql command will create a table on Database.

Now create a Book Model which will look similar to below.

BookController used to perform CRUD operation on DB using Eloquent.

following controller entry in route.php file.

Now ExtJS javascript code what use to create grid on client side and send data using ajax request.

Output will look similar to screenshot below.

extjs laravel tutorial example - ExtJS 4 and Laravel 4 CRUD tutorial

Source techzoo.org