I take back everything bad I said about Laravel
Spent the last couple of days going through most major frameworks:
- Symfony: too complicated, crazy directory structure, strongly disfavours existing databases
- CakePHP: old architecture, difficult to adhere to legacy stuff
- CodeIgniter: old architecture, bloated, some illogical structures
- Yii: didn't like their approach to some things, no major issues otherwise
- Kohana: confusing/incomplete documentation, horrendous query builder, other issues I've forgotten
- FuelPHP: didn't like their approach to some things, no major issues otherwise
- Zend: basically a massive library of libraries, too complicated
- And a few other minor ones that I can't remember (note to self, take more notes
)
tl;dr all of them have far more 'flaws' (in my opinion of course) than Laravel
- Pretty much discourages raw SQL
Nothing a little custom bundle can't solve
- If you don't use Eloquent ORM, there's little point in separating database queries (be they raw SQL or Fluent) into models besides semantics (would be all static methods)
Eloquent is actually really nice, especially given the fact that it needs almost no information about the database and plugs into existing databases perfectly.
- Too many static methods, might as well be a bunch of global functions
Actually works quite effectively, more laziness friendly than a load of singletons
- Blade template engine syntax isn't as nice as Smarty (longer operators and shorthand/single-line if statements look awful), nor is it highlighted/supported by any editor I'm aware of
Custom smarty bundle to the rescue
- Undefined variables in Blade throw errors (necessitating isset everywhere) and they stand behind this illogical approach
This issue also occurred in smarty, but worked around with some insane hacks
- It's not written with IDEs in mind at all, takes workarounds to get even basic code completion
It's not as bad as I made it out to be in this regard, the only real issue is 'go to definition' on laravel classes takes 2 steps
- The directory structure where the vast majority of the PHP files must be outside the web root is a nightmare to cater for
I can survive working around this, either through not being lazy with my server config (
) or by inverting the directory structure such that public becomes the root and everything else is in a single subfolder (flagged as internal in nginx config)
- Have to explicitly escape variable output - common sense dictates that somewhere will be overlooked/forgotten and the reverse (explicitly not escaping) is much safer
Their approach actually makes a lot more sense once you start using all the helper functions for forms etc.