Empty states with CSS and the `:only-child` selector

2023-09-28 #css #tailwind #laravel #blade

Here's a quick trick with the :only-child selector to display an empty state in a list.

Read more


Laravel Blade & View Models

2022-01-10 #laravel #blade

An overview on view models in Laravel

Read more


Vite with Laravel: Auto-refresh Blade views

2021-03-22 #laravel #vite-with-laravel #frontend #build-tools #blade

How to set up Tailwind CSS in Vite with Laravel.

Read more


Blade component aliases in Laravel 5.6

2018-02-05 #laravel #php #blade

Laravel 5.6 adds the ability to register alias directives for Blade components. Let's review some background information and examples.

Read more


Theme-based views in Laravel using vendor namespaces

2017-08-24 #laravel #php #blade

I'm building a multi-tenant Laravel application. One of the requirements of the project is that every client can have their own theme based on their corporate guidelines. By default a few css adjustments will suffice, but some clients request a completely different template.

Conditionally loading a different stylesheet per client is pretty trivial, but in order to use a completely different view per theme you quickly end up typing the same thing over and over across various parts of your application.

Read more