Detailed comparison of PHP frameworks; laravel vs codeigniter
Laravel and codeigniter are among the best frameworks in PHP so far.
CodeIgniter is the oldest, most commonly used and simplest of all; while Laravel is very young but it comes with a lot of features out-of-box and is becoming a preferable choice for new applications.
Know about Top 6 reasons to choose php for website development.
Laravel vs CodeIgniter
From my experience I have listed down comparison between the two php frameworks:
# | Laravel | CodeIgniter |
---|---|---|
Initial release | 2011 | 2006 |
Started by | Taylor Otwell | Rick Ellis, now it is a project of British Columbia Institute of Technology |
License | MIT License | MIT Licence |
Official website | www.laravel.com | https://codeigniter.com/ |
Current stable version | 5.2 | 3.1.0 |
Difficulty level | Average | Very easy |
Framework pattern | MVC | MVC |
Memory recommended | 1GB | 256MB |
CLI Tool | Yes, Artisan tool is present. It helps to create controller,model,migrations, seeding, put/bring project in maintenance mode, and a lot more features. | No |
Databases support | MySQL, Postgres, SQLite, SQL Server | MySQL, Oracle, PostgreSQL, MSSQL, SQLite, CUBRID, Interbase, ODBC |
NoSQL(MongoDB) support | Not inbuilt, 3rd party library can be used. | Not inbuilt, 3rd party library can be used. |
Cache drivers | File, Memcache, Redis | File, Memcache, Redis, WinCache (useful for windows) |
Session drivers | File, Cookie, Database, Memcached, Redis | Files, Database, Redis, Memcached |
Mail Drivers | SMTP, Mailgun, Mandrill, SparkPost, Amazon SES, Mail, and sendmail | Mail, Sendmail, and SMTP |
Queues Drivers | Database, Beanstalkd, Amazon SQS, Redis, and synchronous (for local use) driver. | not inbuilt, 3rd partly library can be used. |
Supports ReSTfull architecture | Yes, good support with routes and controllers. | Yes |
Localization / Language | Yes | Yes |
Route support | Yes, with lot of features. Using routes is compulsory. | Yes, using routes is optional. |
Template engine | Yes, Very good support of Blade template. | Minimal, and they discourage the use of template engine. |
Authentication system | inbuilt, very flexible | Not inbuilt, 3rd party auth can be integrated. |
Authorization system | Inbuilt | Not inbuilt, 3rd party authorization can be used. |
Admin generator | No, scaffold for login and registration is present. | No |
ORM | Eloquent ORM, with lot of features. | Codeigniter DB driver (CI_DB_driver) |
Pagination | Inbuilt, easy to use, flexible with inbuilt bootstrap support. | Inbuilt, easy to use, flexible |
Migration & seeding | Inbuilt | not inbuilt. |
TDD (Test driven development) framework | Inbuilt PHPUnit | not inbuilt, PHPUnit or any other can be integrated. |
Form data validation | Inbuilt with good support | Inbuilt with good support |
Uses Middleware | Yes, helps with validation like CSRF check, authentication, etc | No, but all such validations can be done here also. |
Support for Virtual machines | Inbuilt, Homestead for linux/windows(pre-packaged Vagrant box), Valet for mac. | Not inbuilt. Virtual box / Vagrant can be easily used. |
Hope I have listed all points which will help you choose between the two frameworks for your next project. In case I missed some points, I would highly appreciate if you could share in comments below.
Do share if you feel this article will be of value to other readers.
Know about PHP 7 New features and benchmark for WordPress, Magento, Laravel, ZF2
Thanks 🙂
10 Comments
Very good comparison Nikhil, it would have been greatly appreciated if you could have also included a Pros and Cons list of using these two frameworks.
2016-10-05 08:38:55i am currently as codegniter developer from last two months .how much time need to learn Laravel 4 or Laravel 5. and can i started whith Laravel 4 or directly with 5.
2016-09-17 20:03:39Good that you have started with codeigniter, you can directly start with newly released Laravel 5.3.
2016-09-19 10:12:47Laravel is very simple, the documentation is good to get started with it. In case you need help leave a note here.
[…] http://thewebfosters.com/blogs/comparison-php-frameworks-laravel-vs-codeigniter/ […]
2016-08-23 10:58:00One thing you forgot to mention about laravel is "collection".
2016-08-23 09:38:44oh..yes.
2016-08-23 10:32:28Thanks for adding it ! #keepSharing
Good comparison.
2016-08-09 09:55:55Thanks Hiren !
2016-08-09 10:05:36I have to admit I'm a Zend supporter. As Zend maintains PHP itself, the Zend Framework is liable to be the longest lasting PHP framework of all.
2016-08-05 08:46:17It also has a HUGE range of Google plugins, which is pretty handy for many apps. Zend is extremely easy to use, and the core is compact and fast.
Downside: The documentation. Everything is there, but not always where you'd expect to find it!
Almost all Google plugins for php frameworks are available at packagist.org. Laravel, CodeIgniter, Zend all are long lasting and good part is they keep on providing updates with latest technology trends.
2016-08-05 11:02:59Thanks for sharing your view.