Soldges
Soldges
FFilament
Created by ImShehryar on 8/21/2023 in #❓┊help
CheckboxList Relationship Options Descriptions
This works... But doesnt look great. But I fixed my problem... I had the wrong values in the description
7 replies
FFilament
Created by ImShehryar on 8/21/2023 in #❓┊help
CheckboxList Relationship Options Descriptions
But manually does not work with ->relationship? Or am I doing something wrong? the descriptions are not showing
7 replies
FFilament
Created by Soldges on 3/31/2024 in #❓┊help
Why is my Action visible?
you are so right 😁 I only checked the database field and not my actual code. I sorry. You guys rock!
12 replies
FFilament
Created by Soldges on 3/31/2024 in #❓┊help
Why is my Action visible?
Thank you guys! I found my mistake... I forgot that status is an ENUM. Thanks to your help I was able to fix it: ->visible(fn ($record) => $record->status === InstanceStatus::RUNNING)
12 replies
FFilament
Created by Soldges on 3/31/2024 in #❓┊help
Why is my Action visible?
And I am Not changing that value in the visit site
12 replies
FFilament
Created by Soldges on 3/31/2024 in #❓┊help
Why is my Action visible?
Yes. Status is a string.
12 replies
FFilament
Created by Soldges on 3/31/2024 in #❓┊help
Why is my Action visible?
Oh sorry... my text was wrong... I mean "Why is my action button not visible".... My mistake. So with the code above the action button is not visible...
12 replies
FFilament
Created by Soldges on 9/11/2023 in #❓┊help
Buttons on the right side
Worked for me
11 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
Maybe the problem is that I add the trait to the user model and the traits tries to fetch the authenticated user but for this it needs to boot the user model and thats an loop... Hmm... In my other plain laravel 10 app without Filament it works without any problem
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
In the docs https://filamentphp.com/docs/3.x/panels/tenancy#simple-one-to-many-tenancy It it also outside the closure use Illuminate\Database\Eloquent\Builder; class Post extends Model { protected static function booted(): void { if (auth()->check()) { static::addGlobalScope('team', function (Builder $query) { $query->where('team_id', auth()->user()->team_id); // or with a team relationship defined: $query->whereBelongsTo(auth()->user()->team); }); } } }
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
Ok, I will have a look at it.
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
That was just my example. Here is the code and it is inside the closure but still false public static function bootBelongsToTeam() { if (auth()->check()) { static::creating(function ($model) { $model->team_id = auth()->user()->team->id; }); static::addGlobalScope('team_id', function (Builder $builder) { return $builder->where('team_id', auth()->user()->team->id); }); } }
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
middleware auth should be booted before user
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
hmmm.. Okay. Then I have to try this solution: https://filamentphp.com/docs/3.x/panels/tenancy#simple-one-to-many-tenancy I thought it would be better and more flexible in a Trait than directly in the model
16 replies
FFilament
Created by Soldges on 9/12/2023 in #❓┊help
auth()->check is false
I am using it the default Laravel User Model.
16 replies
FFilament
Created by Soldges on 9/11/2023 in #❓┊help
Buttons on the right side
@awcodes thank you!
11 replies
FFilament
Created by Soldges on 9/11/2023 in #❓┊help
Buttons on the right side
I thought about a "official" Filament way
11 replies