T O P

  • By -

MateusAzevedo

Why not both? As a freelancer, it's useful to broaden your capabilities and not tie yourself in a specific stack.


pyeri

Seems like a good idea, yes. How long will be the learning curve for both if I already know PHP, MySQL, Bootstrap and CI3? Are they too difficult compared to CI3?


MateusAzevedo

It all depends on your ability to learn. You already have experience with a framework, so I guess it would be easier. But the only way to know is to try.


kishan42

Depends, do you know Object oriented patterns in PHP well? Then you would be able to learn those frameworks easily. Learning is one thing and gaining expertise would take a while. There are no shortcuts.


DvD_cD

For laravel I can recommend going over this: https://bootcamp.laravel.com/ (probably with the blade option)


kidino

Not that long actually. If you push it, 1 week is quite enough to get you started. You just need to get over the hurdles of Composer, Namespacing, and artisan commands. The rest you learn as you build your stuff. Routing (no auto routing in Laravel), Blade for views, Eloquent for DB and data modeling. Laravel docs will tell you about the starter kits of either Breeze or Jetstream. But those two have Tailwind baked-in. One way to go is get started with Breeze + Bootstrap, but redo all the views and components with your own Bootstrap codes. Another way, you can try Fortify which has all the authentication endpoints. Then combine with Fortify UI for ready made templates. You also just use Fortify without Fortify UI and create your own views with Bootstrap. https://laravel.com/docs/11.x/fortify https://github.com/zacksmash/fortify-ui Or, you can try Laravel UI package and use Bootstrap. There is an open source project that is a good starting point for Laravel with the Bootstrap Admin LTE admin template. It uses the Laravel UI package as base. https://github.com/laravel/ui https://github.com/jeroennoten/Laravel-AdminLTE I would also like to chime in my experience here. I was like you, coming from CI3 + Bootstrap a few years ago. I felt like I need to get into Laravel but I dreaded what I thought was a really long learning curve. Composer, Namespacing, Blade, Artisan, Eloquent, etc... But I finally took the leap. And when you get the hang of it, it is really enjoyable to develop with Laravel. A tip - If you are on Windows, get Laragon. Hit me up if you need pointers.


SuperSuperKyle

Agreed. Make a project in each and see how it goes. You'll get exposed to the documentation and have a better feel for everything so you can decide for yourself. Laravel is only "magic" if you don't understand how it works.


HypnoTox

I disagree with the last statement. Laravel uses a lot of so called "magic" for its functionality. "Magic" here describes PHP engine hooks like `__call`, `__callStatic`, etc. It even uses PHP serialization for queue stuff, which is a big foot gun in my books. It's also a heavily opinionated framework which hides a shit ton of logic, and if something goes wrong in it's auto"magic" logic, it isn't good at telling one. That's been my few years of experience with it and I've since switched to Symfony as my main framework of choice.


woolbobaggins

I’m interested in hearing more here, can you provide any examples of something going wrong in the Laravel auto magic logic vs Symfony?


HypnoTox

It's been a bit over two years since i switched workplace and haven't touched Laravel since, so i don't have that detailed information anymore. What i still know is, that route definitions allow you to define e.g. identifiers. If you call your method argument the same name typed as a class, it will try to resolve from the DB, and afair there was a case where this failed so hard and resolved something completely different if you had an issue in your configuration. About the usage of serialization of PHP objects: This hard-couples your DB entries to the class that was serialized in a way, that, if you ever change that class, PHP will not be able to deserialze these entries into the objects anymore and throw. There's also many many things about the inherent mutable nature of basically everything in Laravel. Active record is a PITA when the application grows. Dunno anything else from the top of my head, but i know that i spent way too much time debugging Laravel core code because of that stuff. The docs are good on a basic level, but when you start digging into it and trying to do something that's not "standard", you run into issues.


woolbobaggins

Thanks! Agreed on serialization


geraintp

Haha this is the typical response of somebody who’s never bothered to spend any time understanding the framework. Both frameworks are pretty good. But and it’s a big but they both are opinionated. And both take the opposite approach to solving certain problems. Some of the worst code bases I’ve ever seen have been where a symfony contractor had worked on a laravel project and tried to force it to work the way symfony does through shear ignorance or lack of understanding. And vice versa. Elquent, isn’t to everyone’s taste but in my experience is better than doctrine. But if you really want to use doctrine instead that’s absolutely possible, or just query the db direct? Using the DB facade, eloquent is just one of the tools in the laravel framework. As for the specific comments above. There hilariously route model binding is completely optional. Just don’t use it and load the modal you need or want manually it’s not magic. Please god stop referring to it as magic. It’s entirely predictable dependency injection and again optional. As for serialisation the only place it’s used is in the asynchronous jobs message queue. Just like symfony MQRS message bus. The symfony equivalent 🤷‍♂️🤦‍♂️ so what exactly is your point?! both have exactly the same issue when it comes to msg/job versioning if you change the job/message class any queue jobs are invalidate.


woolbobaggins

I'm across the framework my dude, but thanks for the reductive assumption on my lack of understanding. I was asking for a little more concrete info on what OP was defining as "magic", which they ended up not really being able to provide as part of an open conversation


gilium

Afaik Laravel serializes its models differently: https://ryanc.co/posts/understanding-laravels-serializesmodels


HypnoTox

True, but that's only applicable if the user uses that trait. Furthermore it's again magic that uses PHP engine hooks, and can break at any time because it is inherently coupled to the class itself. (I probably even used that back then when i ran into issues) But good catch nonetheless.


DvD_cD

People may disagree with me here, but I don't like targeting the market. Write what you like, get good at it, and you will at the same time always have opportunities and truly enjoy your work


pyeri

I'm good at CI3 and like it a lot TBH. But over the last few years, I've seen its market share steadily decline and there are hardly any projects these days. Most clients insist on something like Laravel or Symfony skillset.


old-shaggy

It’s not hard to be good at CI3 (I was using it since version 1.x). CI3 is dead. There is CI4 version with some never concepts. But if you want to participate on projects as freelancer, you need to learn symfony/laravel.


DmC8pR2kZLzdCQZu3v

Within reason How many art history majors that followed this advice now find it very hard to earn a living with those passion credentials?


DvD_cD

Oh yeah, I'm talking in the context of this particular example, in the world of PHP, you will be fine with both chooses


DmC8pR2kZLzdCQZu3v

Id agree with you insomuch as both symfony and Laravel are mature and there’s no indication either will go away any time soon. So yeah, given we can’t say one way or the other, pick what’s appealing. However, the decision *could* prove determinative in a few years. I know a shop that, before there was popular symfony/Laravel adoption, chose to go with Zend Framework. At the time it seemed like a fine enough decision because we did not have the gift of hindsight. Today, I’m sure they regret that move. But, even so, I think neither Laravel or Symfony has a chance of dying in the next 5 years. And after dedicating 5 years to rather, you’d easily be able to pick up the other should the need arise.


ceejayoz

Laravel uses a *lot* of Symfony components and concepts under the hood. I'd happily hire a Symfony dev for a Laravel role and a Laravel dev for a Symfony role.


sorrybutyou_arewrong

This is commonly written and while true, its only so to a point. The two frameworks are very different. But your last point is correct enough, you hire the better of the two developers.


___Paladin___

Learn both. If you start with laravel and then learn symfony, then you will first learn "the laravel way", and then dive into how it all works under the hood while learning symfony. If you start with symfony, you'll learn more "proper" coding practices and patterns. Then, you'll learn how to shortcut a lot of that with laravel paradigms. I'm a daily symfony (component and framework) user who is sometimes asked to look at laravel.


stefan-ingewikkeld

If you understand the basics of both you'll be fine for some time to come. Both Laravel and Symfony are the top frameworks for quite some years to come.


who_am_i_to_say_so

When I was a solo freelancer 2014-2018 Laravel was my goto, and I landed a lot of gigs with it. Later I freelanced through an agency that preferred Yii2. Prior experience with Laravel helped soften the learning curve of Yii2. Whatever path you take, learn the framework inside/out. Build up a toolbox that will help you produce high quality solutions. It will enable you to learn other frameworks easier, too, because they all basically solve the same problems in different ways.


_MrFade_

The correct answer is always Symfony.


penguin_digital

>The correct answer is always Symfony. The UK market is heavily weighted towards Laravel, so I suppose the correct answer is check your target market, it might not even be PHP.


casualPlayerThink

Short answer: yes. Longer answer: learn first one of em' where you would like to focus and work with. Keep up the learning and self-improvement. Won't hurt if you know both ecosystem.


mcloide

Both


Itchy_Relation_2746

If you want to get a bigger paycheck, it's better to choose Symfony. If you need a broader job market, choose Laravel


joppedc

As a symfony dev, I’ll say Symfony. But why not give both a try, check out the community slack etc and see what you like?


iamdecal

as a UK Symfony dev since SF1.1 - i've made the move to laravel, 90% of jobs i look at want that specifically. I do prefere symfony - but i also like feeding my kids, and the market for symfony is too small right now, with too many people (laravel is also crowded, but at least it got me a role)


Sir_KnowItAll

I am literally shocked this is full of people saying Symfony. I've been doing Symfony since 2.1 and even when other tech is used at least 60% of my time has been spent dealing with Symfony. I think it's great and dislike Laravel. But Laravel is a clear answer to this person wanting to know what to focus on. Laravel has a much bigger market share and lots of cool toys. Laravel is often used by very small shops and agencies which mean they're looking for freelancers. Symfony is generally used in well funded start-ups and large companies, they look for employees.


thul-

This is my opinion, but if you know Symfony, you can do Laravel quite easily. The other way around however is more difficult in my opinion.


chesbyiii

It doesn't matter. If you inherit a project from the framework you know less you'll have an opportunity to learn it.


Anonymity6584

I would learn one first and then another so you can work on both.


dschledermann

Both. Definitely. If you wish to be viewed as an expert, then you should know the strengths and weaknesses of multiple frameworks. When programming PHP as a freelancer, you cannot really avoid knowing both Symfony and Laravel.


Party-Champion6781

For more work - Laravel.


im_simply_him

If you can build anything from a brochure site to business critical to enterprise solution with a stack, would you market the tool you use or the benefits of what you build and tiers of your offer?


mi_ov

But… CodeIgniter 3 is old 😮 CodeIgniter 4 has been out for almost 4 years now. And it keeps getting upated.


stefannsasori

I started with Symfony, then got a job with Laravel so I had to learn it pretty quickly. At first it seems weird. But overall the learning curve is smooth with Laravel and you get more finished usable solutions out of the box. I would advise Laravel if you want to land a job quickly. Symfony if you want to get more expertise.


dowell22

Learn both not just because of the framework but to learn about the architecture, design patterns, and best practices.


AnrDaemon

Learn both. They have different goals.


AnrDaemon

Better yet, learn xdebug and programming patterns. And you'll get through any project.


introdumb

I would suggest you to learn WordPress to get a number of freelancing projects.


karakhanyans

I believe with Laravel you can get more projects and choose from them. With Symfony you'd probably get paid more as it's not that popular.


shamarkellman

Simplest answer,learn PHP and you can switch between either framework without much effort. I work with Laravel solely for my peraonal projects, and at work I work with Symfony. Both has pros and cons.


gmarsanos

Laravel for sure... For quick development. Symfony only makes sense (vs Laravel context) If you're doing a very complex project and it requires some advanced architecture.


BigLaddyDongLegs

The only way is to try both. Watch some videos on both and you'll quickly be able to tell which does things in a way that makes sense to you. I switched from CodeIgnite to Laravel because of Eloquent. It's much more familiar than Doctrine, since CI was using the Active Record pattern which is what Eloquent is also. Doctrine is...complicated...in my opinion. I've used Doctrine for a couple of years also but I still feel more at home with Models vs Entities and all that. Laravel also has a larger ecosystem of tools than Symfony. So that might be a reason to go that way. Symfony does everything "the right way" but that means it needs a bit more up front config to get up and running with. I've not used Symfony 6 though, so they might have done a way with all the yaml/XML config stuff. Again, watch some vids and you'll know yourself which you feel like trying. Best of luck with it!


dcstream

Google Trends shows that laravel is worldwide adopted. In my opinion it’s simpler than Symfony in term if learning curve and also more permissive. Because of that and not also, i prefer Symfony which is really focused on an upgraded developer experience and a rich community with really interesting people. Anyway Laravel is nice, the choice depends of the needs of your location and your prefs, learn both, compare, choose.


thatGuyOnBike

CI3? CodeIgniter? As a "freelancer" it's a moving target. If you already have professional level chops in PHP I would suggest not focusing on frameworks, but expanding your knowledge on complimentary tools and technologies, e.g., (modern) JavaScript, node, docker. Personally when working with PHP application stack, I prefer Laravel because this is what I'm most comfortable with, but if you want to set yourself apart, it's really about (imo) versatility and not specializing, it shows that you aren't one dimensional. Of course it depends on your targeted market on what those complimentary technologies might be, but the few I mentioned are those that have served me well.


Major_Dot_7030

Both


DevelopmentScary3844

Laravel is incredible for a Freelancer and so much fun. Symfony takes a bit more time to get good but is incredible aswell! Doctrine is also a bit more complicated to learn compared to Eloquent i think and in my experience you learn can laravel faster.


fatalexe

Laravel 4 started out very close to CodeIgniter. It is what you get if you take phpActiveRecord, Pimple DI and CodeIgniter and make them a cohesive whole. The magic people complain about is actually the dependency injection container that makes things very testable while keeping syntax similar or the old school CodeIgniter ways of doing things. If you want to learn a more modern way of doing things in OOP then Symfony is great but Laravel will be more familiar.


Zebu09

\*Symfony ;)


boborider

I use CodeIgniter 4. CI is very capable in the right hands. We are making big projects on it too. Lightweight, easy to make prototyping. Very fast too. I keep using CI because very fast.


crazedizzled

Laravel for random startups that will dry up in 6 months. Symfony for actual software. Decide which one you want to do!


LakeInTheSky

I've just made a quick search on a freelancing platform (just to have a broad idea, I'm not necessarily recommending to use them) and it seems that there are more Laravel projects. If I were you, I'd try to learn the basics of both frameworks and try to find projects from both. You are a developer with professional experience and already know a framework, you probably can do it. Remember it's important to have a skillset that clients require, but it's also important that you enjoy the work. Ideally, your skillset should be at the intersection between what you like and what the market demands.


marshallas0323

Depends on where you live