* fix: respect table prefixes in query builder relationship aggregates
* fix: preserve one-of-many relationship semantics in query builder aggregates
* fix: respect relationship method constraints in query builder aggregates
Aggregate subqueries were built from a fresh query on the related model,
so constraints defined inside the relationship method itself were never
applied. An aggregate over a relationship such as
`hasMany(Post::class)->where('is_published', true)` silently aggregated
every related row, and `wherePivot()` on a `BelongsToMany` was ignored
in the same way.
Merge the relationship's own query into the subquery with
`mergeConstraintsFrom()`, matching how Laravel builds its own
`withAggregate()` subqueries.
---------
Co-authored-by: Dan Harrin <git@danharrin.com>
* fix: prevent invalid notification id handling in notification actions
* refactor: use Str::isUuid for notification id validation
* test: cover database notification id handling
* fix: validate notification id as UUID before performing database actions
* Fix dashboard route overwritten by home redirect when using tenant slug attribute
`Route::getLastGroupPrefix()` returns the raw group prefix including
binding syntax (e.g. `admin/{tenant:slug}`), but Laravel's
`RouteCollection` indexes routes by the normalized URI without binding
syntax (e.g. `admin/{tenant}`). The `isset()` check on line 182 fails
due to this key mismatch when a tenant slug attribute is configured,
causing the home redirect to be created at `/` and overwrite the
Dashboard route.
The fix strips binding syntax from the root URI before looking it up
in the route collection.
Fixesfilamentphp/filament#19582
* update snapshots
---------
Co-authored-by: Dan Harrin <git@danharrin.com>
* snapshot updates
* tests and test model/resource updates
* `hasAttribute()` check
As a workaround for Laravel's false-positives in `hasRelationship()`.
* Update Post.php
Signed-off-by: Dan Harrin <git@danharrin.com>
* Update config method to use array syntax
Signed-off-by: Dan Harrin <git@danharrin.com>
* Update HasCellState.php
Signed-off-by: Dan Harrin <git@danharrin.com>
* clean up elsewhere
---------
Signed-off-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Dan Harrin <git@danharrin.com>