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
Related
I regularly use Laravel to build applications. Recently, I have started using Lumen to build microservices.
One thing I notice with Lumen, is that I often only need to create 2-3 files, and edit a further 2-3 (providers, configs and routes). In total, I am editing or creating 5-6 files.
It feels to me that my git repositories for these microservices would be way cleaner if they only included the changed files, and then I merged with the Lumen framework during the CI build/deploy.
Does anyone have any experience with doing this? What are the pros/cons?
I build many API services with Lumen, and I always have the entire project on git repo, and when I make changes locally, I pushed it to GitHub and from the server i just take a pull. I wouldn't say there are necessarily pros or cons, just different ways of doing things
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.
I'm using Laravel framework for a small project. It's difficult to commit files to SVN couse 'svn status' command shows cache files and other files used for the framework with files created for me. The questions is if it's necessary to upload to all of those Laravel framework files? I mean Laravel is huge! Or what is the best practice when I'm implementing Laravel with a new project? I'm new with this technology.
for as far as my understanding of the laravel framework goes, most of the files are linked to each other in one way or another, making it almost impossible to delete unneeded/unwanted features without a whole lot of tweaking
After some fiddling building a package for a project we've realised there's some issues with doing what we need to achieve as per Laravel 5 package development clarity
Maybe I should rather explain my goal and someone can suggest a direction to head in.
We've built a Laravel 5 application that now needs to be "re-used".
We had to modify Laravel and implement an Eloquent type base model as our data-source is actually C# Web Services. At the point the call would be made to a database we intercept this and make an "API" call to SOAP.
The major difference will be CSS, maybe some JS & content but all the routes/controllers/models will remain the same across all projects. Most configuration comes from endpoints.
Initially we considered creating multiple asset repositories for each site's styling and have a base repo which is the core Laravel project that gets included. This seemed to get quite complex as we couldn't simply just have a repo in a repo due to branching and multiple directory issues.
We then started experimenting with the idea of building the "core" as a Laravel package but we seem to constantly hit walls. The latest problem being including models in the package. For the models to be called we are using the root projects config/composer to access these models instead of just the service provider. It feels like the package is becoming to tightly coupled to the project config.
Are there any better ways of going about what we are trying to achieve?
Edit:
I forgot about the multiple branch solution on 1 repo but wouldn't this get ugly when it comes to feature development? Example:
master (core with releases that get pulled into _site*)
dev (master dev)
feedback-form (eg. master branch feature)
_site1 (root site with releases)
_site1-dev (_site1 dev)
_site1-reskin (eg. _site1 feature)
_site2 (root site with releases)
_site3 (root site with releases)
This leaving quite a bit of destructive merge power in the developers hands? Read access with pull requests maybe a solution to this?
So after some R&D it seems the best solution right now is to have 1 repo with multiple branches. Developers have read access and have each developer creates his own fork. Developers create pull requests and sync to parent repo through "upstream" remote and developers sync each others forks through additional remotes.
Seems a little clumsy but probably "cleanest" option.
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.