DanielvdSpoel
Typing of getOwnerRecord and Filament::getTenant()
I'm currently using larastan to make sure my code is clean and fully typed, but i find myself to have to do a lot of code comments to make sure the code is properly typed both for my editor and larastan. I'm talking about stuff like this:
and
is there any way to improve this, and be able to directly used Filament::getTenant and have it typed?
3 replies
Manually getting media
The upload and table column work great, but now I want to grab the thumbnail to use in a controller, but I have no way of knowing what is the thumbnail. Since there can be multiple media files connected to an model. How do I do this?
2 replies
Eager loading relationships in table
I currently have this piece of code:
When trying to search i get the error "SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "person" LINE 1: ...nt(*) as aggregate from "volunteers" where (lower(person.fir... ^"
Does anyone have an insight in how i might fix this? I thought the $query->with() would already solve it but unfortuantly it doesn't
14 replies
Filament::getTenant() has no such method
The getTenant method returns a generic type object which ofcourse doesn't have the same methods as my tenant model, is there any way to tell my IDE/PHPStan that those methods do exists?
Example:
Error that i get:
51 Access to an undefined property Illuminate\Database\Eloquent\Model::$id.
5 replies
Multi select relationship complaining about json?
I have this component:
But i get this error:
https://flareapp.io/share/x5MZXKem
name is not json, so i have no clue what's going wrong
3 replies
Relation column search
I have the following column:
I know this is propably a bit of a stretch, but i would like this to work, instead i'm getting this error:
https://flareapp.io/share/dPbWEeX7
4 replies
Filament testing breaks down as soon as i use a policy
So let's say i have a simple test:
THis works fine if there is no dataset policy, as soon as there is one i get this error:
FAILED Tests\Feature\DatasetTest > it can delete Error
Call to a member function getAction() on null at vendor/filament/actions/src/Testing/TestsActions.php:141 137▕ / @var array<string> $name */ 138▕ / @phpstan-ignore-next-line */ 139▕ $name = $this->parseNestedActionName($name); 140▕ ➜ 141▕ $action = $this->instance()->getAction($name); 142▕ 143▕ $livewireClass = $this->instance()::class; 144▕ $prettyName = implode(' > ', $name); 145▕ +9 vendor frames 10 tests/Feature/DatasetTest.php:84 The policy returns true for all functions.. does anybody have a clue what's going on?
Call to a member function getAction() on null at vendor/filament/actions/src/Testing/TestsActions.php:141 137▕ / @var array<string> $name */ 138▕ / @phpstan-ignore-next-line */ 139▕ $name = $this->parseNestedActionName($name); 140▕ ➜ 141▕ $action = $this->instance()->getAction($name); 142▕ 143▕ $livewireClass = $this->instance()::class; 144▕ $prettyName = implode(' > ', $name); 145▕ +9 vendor frames 10 tests/Feature/DatasetTest.php:84 The policy returns true for all functions.. does anybody have a clue what's going on?
19 replies
CSS issue?
This is a pretty fresh project, but i have some weird css issue. I didn't publish any views and i did build my theme:
https://gyazo.com/bcf5a7dbf4291588c06700fbed08599b
4 replies
Simple resource "new tenancy user" tries to create record upon opening model
See description, i have a plain simple resource but as soon as i click on the "new model" button it gives an error becouse it tries to insert a record into the database without any data. How can i fix this?
2 replies