Statamic CMS

Statamic is a flat file cms based on Laravel since version 3, that came out Spring 2020. Before it was based on Lumen. Statamic is used by "Der Spiegel" which speaks for it I guess. Like every Laravel product over the last few years, Statamic is fashion-driven. It presents itself with a unique late 80s neon outfit and hip, conversational language in the docs. If you start with laravel you endup with Tailwind CSS and Alpine.js - it's all coming out of one think-tank.

I don't say it's bad. It's actually all really clever, self-referential and a mono-culture of brogrammers dudes.

Politics aside: Statamic looks from the outside like what I expect:

Building fieldsets and templates and be as flexible as possible.

Installation

It was bit of a hassle because I went the "Install Statamic in an existing Laravel project" route and somewhere in the process some important files were missing. First I had some trouble with getting the user stuff working (using the Backpack DB) and then was able to login, but I missed some basic Statamic things like the Pages collection, the assets and some views (I found out when I compared a vanilla Statamic installation with my backpack/statamic project).

The vanilla install was easy though.

First Impression

I like the backend a lot, I believe the features are good, I fear a config hell with YAML files like in [[CMS - Kirby]], but to setup Blueprints, Statamic offers a neat web interface, so that helps.

Once you setup Blueprints in the wrong place, because you found out you want a set of Globals to be Taxonomies, you can copy around those text blocks easily and it works most of the time.

Sometimes, in deeply nested Blueprints (fieldsets referencing other fields), I see no UI to change those settings. Might be a cache issue.

Compared to Kirby CMS I'm uncertain. I think I had a better headstart with Kirby and it's more straight forward and the Kirby docs are better. But at the end both system have similar features and I need to learn basics of both anyway. Laravel might win here, because it's so omnipresent right now.

A downside with this Laravel based system is clearly the download of 50000 composer packages and the regular "Out of Memory" notice when I want to install something else. It's also very easy to fall behind with Laravels fast developing pace.

Starters

Add On

Snippets

Antler

Modifiers manipulate the data of your variables on the fly in Antlers templates. They can modify strings, filter arrays and lists, perform comparisons, handle basic math, simplify your markup, and even help you debug.

https://statamic.dev/modifiers

Modifier is_local_url

/app/Modifiers/IsLocalUrl.php

Troubleshooting

Error in UrlGenerator.php using Composer

`In UrlGenerator.php line 120:

Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in \vendor\laravel\framework\src\Illuminate\Routing\RoutingServiceProvider.php on line 65

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1`

https://laracasts.com/discuss/channels/laravel/after-update-to-laravel-7-php-artisan-not-working

Fix Call to a member function selectedQueryColumns() on null

Empty the cache with php please cache:clear

https://benfurfie.co.uk/articles/how-to-fix-the-call-to-a-member-function-selectedquerycolumns-on-null-error-in-statamic-3