Hacker News new | ask | show | jobs
by lemonberry 2087 days ago
I've been learning Laravel and Statamic this year. Both are a joy to use. I've been building WP sites for about 7 years. My goal is to never build another WP site again. Gutenberg is just one reason why.

I think one thing that's missing from the templating engine argument is WordPress' data model. While PHP may be a templating language WP's API to access data is a huge pain. A great example is wp_nav_menu. To modify it in any meaningful way you have to use the Walker Class. Seriously? It's an array. If WP's data model were better you could definitely 'foreach' your way through that thing... but you can't.

Antlers has a shorthand syntax to cycle through its navigation type. Laravel doesn't have a native navigation type but when I set one up it's pointing to table of pages. At this point I can use Blade to go through that table and pull out the appropriate title and url.

Why is this nice? No more "#" for placeholder menu items. More control over the Aria roles, etc.

This is just one win, in my experience, of using Laravel/Statamic.

Edit: for grammar

1 comments

Massive fan of Laravel. If the relationship between Statamic and Laravel is similar to that between Wagtail and Python, plus the static storage, it seems like it would be very good indeed.
I don't know anything about Wagtail or Python so I can't speak to the comparison. However, I chose Statamic because it's a Laravel package and can be extended via Laravel. That adds a lot of flexibility to it. From what I understand Livewire is also compatible with Statamic.