Filament 3 edit button not showing in resource
i made a resource called Team and i want to be able to edit my teams from the admin panel so it also shows up in my jetstream application but the edit action button isn't showing up but it does show up on my user resource. i tried reinstalling it but it still doesn't work
48 Replies
You have imported the wrong EditAction xd. Its not Filament
use Filament\Tables\Actions\EditAction;
but Tables\Actions\EditAction
Quick delete? I was about to respond loli did it but it still doesn't work
It works for me
What are you trying to do in the action?
Im pretty sure you cant call form()
make the edit button show up
it does work on my User resource
Remove the form, just keep it as EditAction
this is my UserResource.php
yeah, so why call a form?
im new to filament i just followed a tutorial but that guy explained it badly
or i didnt follow him well enough 😄
when i do it like this it still doesnt work
Filament handles the edit automatically. Unless you want to do something very specific, you dont have to touch anything
Nooo, when I said remove the form, I didnt mean just the word, but everything that is in it. Just leave it as
Tables\Actions\EditAction::make()
like this?
yess
it still doesnt work
What is the issue now?
i don't really know
it just shows up like this
wierd. Are you sure you saved the file?
i double saved it
Hmm, can you share the code here? I want to thorougly read the imports.
If you do, send it as
```php
````
i'm sorry i dont know how to do that
Can you share the EditTeams.php?
That looks ok. Can you do tge same with the resource file?
Can you check which version of filament you are on?
php artisan about
3.0.81
its v3
Ok. I think I found it. Try the following:
Make sure you change the import for the column
uhhhh
it still doesnt work
i have a error in this file
but i didnt even touch it
You sure you have permission to update?
yes im logged in as a administrator
sigh SOmething else is going on. I will make a Teams resource on my machine and when I get it working I will give you the code
okay thank you for helpine me
Solution
This will work
@MRB_KILLER
This looks like a Policy issue to me.
could be
it works
thank you
now this shows up
this is my teamresource.php
You have to add columns to the model. Please read doc for that
I have just ran into the same issue as yourself whilst trying to manage Jetstream Teams with Filament. The issue is with the Team policies. If you go to 'App\Policies\TeamPolicy.php' you can modify the logic for who has access to view and update Team models.
For my application it was a case of adding the following check for my admin users who had access to Filament