Trying both Laravel and Symfony I think there is no need for Laravel (anymore). Laravel just has too much magic that will bite you later on.
The only thing you should skip in both frameworks are 'annotations'. But this is easy to do.
Trying both Laravel and Symfony I think there is no need for Laravel (anymore). Laravel just has too much magic that will bite you later on.
The only thing you should skip in both frameworks are 'annotations'. But this is easy to do.
Especially when that is not explained in the docs or just in a very vague way...
I tried improving the docs by pointing out where magic (e.g. fix naming conventions) is needed and where not, but the mantainer just turned that into vague mush again (after he had even agreed to the changes).
Also if you need any more details that are not in the docs, everyone points you to paid video courses that assume you have a Mac...
That honestly leaves me with a bad taste im my mouth after trying laravel :/
I don’t know. It’s odd.
I assume you're referring to laracasts.com... what does having a mac have to do with the videos there?
A controller should not know about routes.
A model should not know about database design.
For me Laravel was a nightmare to use with Vue. Both template engines (blade, vue) use moustache tags so everything has to be declared inside @vetbatim. Then mix doesn't even compare to ease of vue cli imo. Then the nested directory structure was so confusing (was it inside resource folder, or controller folder). I've never been happier since I ditched these opinionated frameworks
Routing
Templating
DB abstraction
Additionally, the PSR project has standardized a lot of APIs (HTTP request/response, logging, cache to name a few), which means if a package conforms to PSR, you get interop out of the box and can quickly swap implementations if needed.
With both PHP and JS this isn’t the case, which is why you see SO many frameworks for them: all of the parts are already there so the frameworks are mostly just rearranging things. Ruby, Python, Go, etc are general purpose so the frameworks provide a lot more support.
PHP’s biggest hang up for years was lack of name spacing for good module support so EVERY framework had their own version of every core feature you’d need abstracted around its framework naming schema. Can you imagine every framework writing their own database drivers...because that was happening.
As soon as Composer was released it was only going to be a matter of time before the ecosystem started to clean itself up from 9 different ways to install shared code.
Glad to see it’s happening.
composer require guzzlehttp/guzzle
Now you have GuzzleHttp available to your app. This way you include only what is needed. new Vue({ delimiters: ['${', '}']...If you are using Doctrine the only alternative to docblock annotations is XML because they are deprecating YAML support. I really hope they build support in the language itself. I can't understand their fierce opposition to a feature every other major object oriented language has. They are only forcing a large part of the ecosystem, everything that is Symfony or Doctrine based, to use the horrible docblock work around.