F
Filament8mo ago
L!am

Filament resource not showing on website

i made a migration, model and now a resource i followed a tutorial to see how i can make a resource i did everything like the video but i just don't see the resource on my website
Solution:
If you want the resource for your org panel, you should create it for org and not third party
Jump to solution
50 Replies
L!am
L!amOP8mo ago
this is my code now
Lara Zeus
Lara Zeus8mo ago
- can you access it by url directly? - check artisan route:list - do you have policies for the model? - change the slug!
L!am
L!amOP8mo ago
im kinda new to filament and laravel and this was a already existing project of my boss how do i know if i can acces the url directly? and what should i see in the route:list because its really long, what is policies for the model? and why change the slug? (sorry for all the questions)
ChesterS
ChesterS8mo ago
No offence but it looks like you need to familiarise yourself with Laravel first and then look into the rest
L!am
L!amOP8mo ago
ah oke yeah i did some research but not enough i see, do you have some websites that you recommend?
L!am
L!amOP8mo ago
i am just trying to let this work so i can just try out a bit but i cant see it here
No description
Lara Zeus
Lara Zeus8mo ago
🙂 ok so I do agree with @ChesterS either way this will help you with the routes to see it in the browser and search, you should see the same class https://github.com/garygreen/pretty-routes policies is laravel thing https://laravel.com/docs/11.x/authorization#creating-policies the doc is the best resource 🙂
ChesterS
ChesterS8mo ago
Ha, you were faster 😄
L!am
L!amOP8mo ago
oke thanks a lot i will look into those websites 😄 the github has the anwser and the laravel is just to get to know it a bit better right?
Lara Zeus
Lara Zeus8mo ago
the package pretty-routes is just to help you see the routes 🙂
L!am
L!amOP8mo ago
thats easier then route:list?
ChesterS
ChesterS8mo ago
Untill you're confident with the basic stuff, I would suggest you have a look at a page that works and see how it's different from the one that doesn't. Follow Zeus' instructions, see if the URL you're trying to access appears in the list from route:list command You'll get there! Good luck 👍
L!am
L!amOP8mo ago
thanks 😄 i just looked at the route:list and i don't see the shipmentItemResource that needs to be shown so i think thats the problem now i know where the problem is. the thing is now that i need to find how to fix it you guys completly opened my eyes i now see some things that where missing in my migration so lets hope that those things will fix it @ChesterS sorry for the tagg but i had a quick question, i have done some digging but i can't really seem to find information on how to add things to the route:list. Like what do i need to do to add my resource to the roue:list
ChesterS
ChesterS8mo ago
If everything is set up correctly, you don't need to do anything. Resources are added automatically
L!am
L!amOP8mo ago
hmm oke then there should be something wrong in my migration or model right?
ChesterS
ChesterS8mo ago
Migrations and models shouldn't really affect the routes. Follow filaments documentation and you should at least be able to see the routes Whether they work correctly (or if you have access to them) is a different issue. Do you have more than one panels?
L!am
L!amOP8mo ago
yes i do have more then one panel
No description
Dennis Koch
Dennis Koch8mo ago
You probably don't have auto disovery for Resources in subfolders: App\Filament\ThirdParty\Resources
L!am
L!amOP8mo ago
they all seem to work and show up but i can't really find the difference between the not working one and the working one
Dennis Koch
Dennis Koch8mo ago
Is this the only Resource in the ThirdParty subfolder? You need to add it to the Panel via ->discoverResources
L!am
L!amOP8mo ago
i can't seem to find a ThirdParty folder in my resources
L!am
L!amOP8mo ago
this is my resource folder
No description
No description
L!am
L!amOP8mo ago
and the green folder and scripts are the ones that i am trying to make them work
Lara Zeus
Lara Zeus8mo ago
will, from your code here the namespace is namespace App\Filament\ThirdParty\Resources; so where is the ThirdParty? 🙂
Dennis Koch
Dennis Koch8mo ago
The your namespace is wrong. It doesn't follow PSR-4
L!am
L!amOP8mo ago
huh whut its just gone
L!am
L!amOP8mo ago
if i delete the \Thirdparty in the files i get errors like this one
No description
Lara Zeus
Lara Zeus8mo ago
I recommend you take a step back and take a break and breath maybe a coffee or tea! what do you like?! 😂 then when you come back make sure you removed all Thirdparty from other files too 🙂
Dennis Koch
Dennis Koch8mo ago
Is it an actual error or just intelephense that isn't updated yet? Maybe just start over with that resource. Save your files, create a new resource, check that it shows up and copy over your changes.
L!am
L!amOP8mo ago
oke i will try this its a actual error my intelephense is up to date but i will try to make a new resource and ill come back to you if it worked or not 😄
L!am
L!amOP8mo ago
just to make sure im doing it completly right this time thirdParty right?
No description
Dennis Koch
Dennis Koch8mo ago
Oh Third Party is the panel? Didn't realize that As long as it really creates the folder, that's okay. Just make sure the folder exists. Otherwise manually move it there.
L!am
L!amOP8mo ago
this is it right now
No description
Dennis Koch
Dennis Koch8mo ago
Looks better. Does it show up in your Third party panel?
L!am
L!amOP8mo ago
no i don't see it on my website or isn't that what you meant?
Dennis Koch
Dennis Koch8mo ago
"On my website" is pretty broad. You are viewing the "third party" panel, right?
L!am
L!amOP8mo ago
doesn't show here
No description
Dennis Koch
Dennis Koch8mo ago
What's the URL of the page you are on?
L!am
L!amOP8mo ago
http://127.0.0.1:8000/org/9bac32ea-cb5e-4648-99f0-78b380c5f58a its locally hosted so i don't know if you can see it
Dennis Koch
Dennis Koch8mo ago
i don't know if you can see it
Nope. That would be pretty bad 😉
L!am
L!amOP8mo ago
🤣 true
Dennis Koch
Dennis Koch8mo ago
I assume /org belongs to the "org" panel. But you just created the resource for "third party"?!
L!am
L!amOP8mo ago
yes
Dennis Koch
Dennis Koch8mo ago
So why should it show up for org?
Solution
Dennis Koch
Dennis Koch8mo ago
If you want the resource for your org panel, you should create it for org and not third party
Dennis Koch
Dennis Koch8mo ago
Every panel has it's own url via that it's accessed.
L!am
L!amOP8mo ago
oh waauww yeah now it makes sence i did it trough org and it put the files in the right place without me moving it
L!am
L!amOP8mo ago
only 1 thing i made the resource but my app, filament and resources folder turned red like its a error but no folder or script has a error but everything works so ill just ignore it 🤣 @Dennis Koch i can't thank you enough for your patience and your great help ❤️ thank you thank you and also big thanks to Lara and Chester you where also a big help for me
Dennis Koch
Dennis Koch8mo ago
I guess that's the highlighting for version control in VSC 😉
L!am
L!amOP8mo ago
ye i guess so 🙂 but it shows on my panel now onto the next problem 🤣
Want results from more Discord servers?
Add your server