Flux
Couleur d'accent
Toutes les sources

Freek Van der Herten

139 articles Flux RSS
Programmation Web
★ Searching multiple columns with one URL parameter in laravel-query-builder

★ Searching multiple columns with one URL parameter in laravel-query-builder

We just released v7.3.0 of laravel-query-builder, which adds a new way to group multiple filters under a single URL parameter. Before getting into the new feature, let me show you how the basics work, so the new bit makes sense in context. The basics Here's a typical setup in a controller: use Spatie\QueryBuilder\AllowedFilter; use Spatie\QueryBuilder\QueryBuilder; $users = QueryBuilder::for(User::class) ->allowedFilters( AllowedFilter::partial('name'), AllowedFilter::exact('status'), )…

Freek Van der Herten
★ Announcing laravel-sluggable v4 with self-healing URLs

★ Announcing laravel-sluggable v4 with self-healing URLs

The spatie/laravel-sluggable package has been around for close to a decade. A slug is the readable part of a URL that identifies a record, like announcing-laravel-sluggable-v4-with-self-healing-urls in this post's URL. The package generates one for any Eloquent model when you save it, derived from a title or another text field, and most of the time you don't have to think about it. We just released v4, which adds a few things worth talking about. Let me walk you through them. Generating slugs…

Freek Van der Herten
Esc