The Blog

Statamic

Creating a Statamic Compact Modifier

John Koster
John Koster
November 7, 2021

Throughout this guide we will explore Statamic modifiers by creating a modifier that will allow us to iterate multiple Antlers variables.

Statamic

Using Modifiers in Antlers Dynamic Bindings

John Koster
John Koster
November 7, 2021

Utilizing modifiers within Antlers dynamic bindings can be a powerful way to simply templates.

Statamic

Creating a Custom Statamic 500 Server Error Page: Part Two

John Koster
John Koster
September 12, 2021

Creating a dynamic Statamic 500 Server Error page is a relatively simple process, as well as developing a custom Antlers tag to help test it.

Statamic

Enabling Database Users in Statamic 3

John Koster
John Koster
February 20, 2021

In this article we look at solving two errors ("password_activations" or "password_resets" database tables not existing) that can appear once a Statamic 3 site has been configured to store users in a database.

Statamic

Integrating Laravel Spark, Stripe, and Statamic 3

John Koster
John Koster
February 20, 2021

In this article we will start with a fresh Statamic 3 website based on the Cool Writings Starter Kit, integrate Laravel Stripe, and develop customer Antlers tags that can be used to selectively restrict access to premium content.

PHP

Implementing a Customer Domain Specific Language Parser in PHP

John Koster
John Koster
February 15, 2021

Implementing a custom domain specific language parser in PHP, from scratch. Our language parser will parse a custom query filter language.

C#

Implementing C# Events

John Koster
John Koster
January 7, 2021

C#'s event features are an elegant wrapper around the delegate type, making it incredibly simple to create custom events, and consume existing events.

Statamic

Creating a Custom Statamic 500 Server Error Page

John Koster
John Koster
December 29, 2020

Customizing a Statamic site's 500 Server Error page is a relatively simple process, as well as developing a custom Antlers tag to help test it.

Laravel 5

Laravel 5 Collections: Adding an Element to the Beginning of a Collection With prepend

John Koster
John Koster
April 22, 2018

The prepend method in Laravel's Collection class allows you to add a given value to the beginning of the collection. It also accepts an optional key parameter for adding items to the beginning of an associative array. The method returns a reference to the original collection instance. In the provided code examples, a new item is added to the beginning of the collection using prepend, and the resulting collection is printed. In another example, an item is added to the beginning of an associative array with a specified key using prepend, and the resulting collection is printed.

Laravel 5

Laravel 5 Collections: Adding an Element to the End of a Collection With push

John Koster
John Koster
April 22, 2018

The push method in Laravel is used to add an item to the end of a collection. It returns a reference to the original collection instance. However, it cannot be used to set the key of the item being added. To use the push method, you create a new collection instance, and then call the push method on it, passing the item you want to add as a parameter. After the push method is executed, the collection will be modified with the new item added at the end.

Latest posts

Where Things get Good: Moving on to Forte Development Phase 1

Wrapping up Forte Phase 0 with the lexer and parser now in private alpha, and kicking off Phase 1 wi...

Read more
Forte Update: Backtracking, Metadata, HTML Validation, and More

A Forte development update: the parser now supports backtracking, improvements to node metadata, ide...

Read more
Parsing HTML and Blade Attributes in Forte

Wrapping up attribute parsing in Forte's HTML parser, from simple HTML attributes to complex, edge-c...

Read more
Switch Statements and Parser Extensions in Forte

Exploring how Forte's parser extensions can be used to handle complex Blade directives like nested s...

Read more
Parsing Blade Comments in Forte

Digging into parsing Blade and HTML comments while building Forte's HTML parser for Laravel Blade.

Read more
Thoughts on HTML Elements and Blade Components in Forte

This week I’m tackling Forte's HTML parser - consolidating Blade, Flux, and Livewire components into...

Read more