niels / Software / #laravel

Embedding Laravel Passport keys in .env

When deploying a Laravel project to a server, in an ideal scenario, there are two primary steps you should follow: Clone your git repository Configure the .env file However, the introduction of Laravel Passport seemed to disrupt this streamlined process. Every time I deployed to a new server, I found myself needing to manually copy […]

Read more..

niels / Software / #laravel

Redis Sentinel with Laravel

As the use of Redis Sentinel with Laravel does not appear to be documented at the time of writing, I’m sharing the configuration I’m using. This is the redis section of my config/database.php: ‘redis’ => [ ‘client’ => env(‘REDIS_CLIENT’, ‘predis’), ‘options’ => [ // Don’t set ‘cluster’ option. The only valid values are ‘predis’ and […]

Read more..

niels / Software / #filament,#laravel

Auto-reloading Filament (v3) panels using Vite

When integrating a Filament panel into your Laravel project, you might find that Vite’s auto-reloading feature isn’t functioning as expected. This issue arises because the panel isn’t loading Vite-managed resources. While a long-term solution might involve crafting your own Filament theme that incorporates Vite, there’s a straightforward workaround available. By tweaking the AdminPanelProvider class to […]

Read more..

niels / Code / #laravel,#nova,#php

Managing languages with Laravel Nova

The real title of this post should be Managing many languages with Laravel Nova. You’ll find out why, very soon. Using Spatie’s Laravel Translatable and Nova Translatable packages managing multiple languages with Laravel Nova is easy. Follow their instructions and it probably takes you less than 20 minutes to make your model translatable. I will […]

Read more..