Difference between laravel 5 and codeigniter 3 - php

This may silly question. But I am going to start new project. I am quite confused which framework is best out of Codegniter 3 and Laravel 5.
What is the main difference between them.
Thanks in Advance

Right now, I personally prefer Laravel since it supports PHP7 unlike CodeIgniter (I still haven't read if CodeIgniter 3 supports PHP7). And based on personal experience, Laravel (through Eloquent) has "beautifully-written-codes".
Here are some references for you to check out: (I made sure to post both sides to not be bias)
https://www.codeclouds.com/blog/laravel-vs-codeigniter-a-difficult-choice/
https://www.clickittech.com/developer/laravel-vs-codeigniter-which-one-is-the-best-to-use
http://www.codeigniterhands.com/codeigniter-or-laravel
http://laravel.io/forum/07-08-2014-laravel-vs-codeigniter-a-difficult-choice
https://therightsw.com/codeigniter-vs-laravel-vs-yii-vs-cakephp/ (with grades for usability)

Each framework have their own features and capabilities, used during the development of application. Laravel is one of the highly used, open-source modern web application framework that designs customized web applications quickly and easily.Laravel is used not only for big project but also best to use for small project.
Best framework in 2018
If you want a framework with exceptional performance, with nearly no configuration, not using cmd and not interested with large scale libraries and also your project is in small scale it's better to use codeIgniter.
CodeIgniter3 vs Laravel5

Both framework are good in there place.
Laravel made from multiple open source project which make laravel more efficient , reliable and secure.
Where, laravel used blade engine.
It used composer for package manager.
It provide unit testing.
It provide more security.
It provide beautiful redis queue front portal called laravel horizon.
Disadvantage : laravel used predis which is slower, because it is written in php.where phpredis is more faster, but laravel 5.* Don't support it.

I will recommend you to use Laravel beacuse of:
Built in authentication
Awesome migrations
Artisan commands to do anything in your project
Built in pagination (It's took long in Codeigniter)
Eloquent (Very easy way to interact with your database)
Relationships
Routes
Easy API building
Easy debugging
Huge number of packages and libraries etc.

Related

Laravel Framework php

I've made an online store in php for school, and now my teacher wants this project to have a Laravel Framework. And I have no freaking idea how to do it. Are there any possibilities to implement this framework to my project, or my project to this framework, without starting from scratch? If yes, how should I do it?
irrespective, its going to involve a lot of rework. A lot also comes to down to HOW you've developed your original php app. Laravel is a Model View Controller framework. For starters all your routes (http redirects) are generally managed in a single file (web.php). Your views can be traditional php, however, Laravel gives you a good templating engine called Blade which allows you to shorthand code and keep code a lot cleaner. Models control your table relationships, controllers handle the functions/code/crud etc.
You will love how easy it is in most respects - especially the way eloquent data queries work etc. It can greatly reduce your code.
If your teacher wants you to LEARN Laravel specifically, I would say YES you will be starting over - however, your logic in the code should just need reworking rather than start from scratch.
There are heaps of posts around HOW to install Laravel (apache, virtual box, homestead etc) - once your ready, its super simple to create a new project and start building away... If you are new to MVC, you should do some tutorials first (e.g. laracasts or other).
Best of luck :)

Feasibility of using Laravel compared to Codeigniter

I have been developing in Codeigniter for awhile now. I have recently read that Laravel is currently the most modern and best framework. I am interested in learning it for my next project. I'm hoping that someone could help to answer some questions that I have about Laravel.
1) How would I host it? Laravel seems to rely on composer a lot and that requires a terminal. For CI, I just download a folder and load it up to my Webserver and I can run it.
2) Dev environment. I have been using Netbeans that is connected to my server and it can push updates instantly. I want to connect it to git soon for some versioning as well. Is it the same for Laravel? How would I update it?
Same here, I have been developing Applications in Codeigniter 2,3 for past 5 years and now I am learning Laravel and have starting making beginners level application in Laravel Here are my findings which might help you
Difficulties
For Codeigniter Developer, Instantly playing everything by using router is kind of difficult. Although router is used in codeigniter as well
Installing and setting up Laravel seems like a tricky and very lengthy job especially the use of composer which is an extra thing as compared to codeigniter which is just download and uncompress or copy paste installation procedure.
But Why Laravel?
Object Relation Modeling - Eloquent ORM
We can easily create relations and joins with query builder or active records in codeigniter but to enforce referential integrity in database, we have to write triggers in our database or define relations. Luckily in Laravel the relations are made with one line of code and does a lot of job. Whereas in Codeigniter that's a lot of manual code writing.
Integration of off the self Packages.
There are thousands of developed packages readily available on packagist, which is a repository composer uses to download software packages. You just have to write one or two lines of code at composer terminal and it does all the rest, create models, controllers, views. All you have to do is include them or change the styling as per your layouts.
Think of Laravel as a PHP framework for extremely lazy developers who want to write very less and re-usable code and do lot of work from it.
Learning Resources
Laravel 5.2 from Scratch that's the one I started with, excellent course and Modern Web Development with Laravel
Uploading on Shared hosting
Click here for tutorial

Which version of Laravel to use LTS or latest - developer support commitment for 5 years atleast?

As a developer I have to make a upfront commitment for 5 years support for a new Laravel project.
My question is - whether I should use Laravel's Long Term Support (LTS) version only?
What could be the potential pitfalls with regards to the support commitment if I use the latest Laravel 5.3 instead of the LTS version?
Any information regarding points to be considered like pros/cons with regards to the support commitment for 5 years when using the latest Laravel version versus using LTS version would help me make a correct decision.
To keep your application framework-agnostic, or to make it easier to swap out or not depend on the framework, the approach which worked the best for me was to isolate my business logic in separate libraries.
I handle those libraries using GITLab server, and I expose them to my composer via satis.
If you use Laravel's routing to map request to a controller, then you can use your library inside that controller and perform the rest of the work.
Constructing your app this way lets you:
isolate business logic
rely on framework to provide correct input since you can use middleware to filter out requests that don't fit.
have it easier when it comes to swapping the framework out
you're using composer, which lets you easily manage library and framework version(s)
This way, you can upgrade your app bit by bit as time goes by, you don't have to rely on having only one framework version forever, without being able to use newer releases.
Good luck with your project!

PHP: Yii1 to Yii2 upgrade

I have a huge project written on a Yii1 framework. Now I have the task to port the whole project to Yii2. I know it's impossible to simply update the code and I have to do a lot of copy-paste-edit job.
But the Yii1 code is pretty proper and standardized, no spaghetti or something, and I wonder if people have some helpful tools to translate models, views and controllers from Yii1 to Yii2. How can I help myself to do it faster and automatize the process?
Yii1 and Yii2 have many things in common, but at the same time they are very different. There are no tools, converters, etc. to automate this process. You have to do it manually.
Please refer to official docs links mentioned in the comments:
Upgrading from version 1.1
Using Yii2 with Yii1
So, as an alternative you can try to do partial migration from Yii1 to Yii2.
Even Yii1 project code quality can be pretty high, it's not actively supported as Yii2, and its support will end at the end of 2016 year (as far as I remember).
Yii2 is so much better, so if you have possibility and time, it's better to migrate to Yii2. But if you have no plans to improve your project much (only implement small features, fix bugs, etc.), leaving it on first version seems like normal solution.

Using Laravel 4 for a subproject of a larger existing project

I am starting a small project that I think might be well suited for Laravel 4. However, the project would have to coexist with a much larger existing legacy project, one that has its own bootstrapping system and routing (via htaccess). Is there a good way to have Laravel 4 coexist with an existing project in this way?
The way you normally start a Laravel 4 project basically takes over the entire project directory. That wouldn't be suitable for our current legacy project, which has many of the php scripts right in the public_html directory. Perhaps the entire Laravel project could be installed in a subdirectory of the main project, but that seems like a fairly messy solution. Is there a better way?
Yes, Laravel 4 components can be used without installing or using the full Laravel 4 framework - it's really flexible and pieces can be swapped out.
I would use Namespaced Controllers and Models, map your legacy code to them and slowly migrate over as alot of Laravel 4 can be used individually in external projects.
Eventually you can move over the routing to the Laravel 4 or any other Router you choose.
I've used the Database Layer in a Codeigniter project without any problems.
The only thing you need to be careful of is the PHP version as it relies on mcrypt, but if your're not using any of the password features I think you'll be okay.

Categories