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
L
L!am18d ago
this is my code now
LZ
Lara Zeus18d ago
- can you access it by url directly? - check artisan route:list - do you have policies for the model? - change the slug!
L
L!am18d 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)
C
ChesterS18d ago
No offence but it looks like you need to familiarise yourself with Laravel first and then look into the rest
L
L!am18d ago
ah oke yeah i did some research but not enough i see, do you have some websites that you recommend?
L
L!am18d 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
LZ
Lara Zeus18d 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 🙂
C
ChesterS18d ago
Ha, you were faster 😄
L
L!am18d 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?
LZ
Lara Zeus18d ago
the package pretty-routes is just to help you see the routes 🙂
L
L!am18d ago
thats easier then route:list?
C
ChesterS18d 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
L!am18d 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
C
ChesterS18d ago
If everything is set up correctly, you don't need to do anything. Resources are added automatically
L
L!am18d ago
hmm oke then there should be something wrong in my migration or model right?
C
ChesterS18d 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
L!am18d ago
yes i do have more then one panel
No description
DK
Dennis Koch18d ago
You probably don't have auto disovery for Resources in subfolders: App\Filament\ThirdParty\Resources
L
L!am18d 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
DK
Dennis Koch18d ago
Is this the only Resource in the ThirdParty subfolder? You need to add it to the Panel via ->discoverResources
L
L!am18d ago
i can't seem to find a ThirdParty folder in my resources
L
L!am18d ago
this is my resource folder
No description
No description
L
L!am18d ago
and the green folder and scripts are the ones that i am trying to make them work
LZ
Lara Zeus18d ago
will, from your code here the namespace is namespace App\Filament\ThirdParty\Resources; so where is the ThirdParty? 🙂
DK
Dennis Koch18d ago
The your namespace is wrong. It doesn't follow PSR-4
L
L!am18d ago
huh whut its just gone
L
L!am18d ago
if i delete the \Thirdparty in the files i get errors like this one
No description
LZ
Lara Zeus18d 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 🙂
DK
Dennis Koch18d 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
L!am18d 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
L!am18d ago
just to make sure im doing it completly right this time thirdParty right?
No description
DK
Dennis Koch18d 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
L!am18d ago
this is it right now
No description
DK
Dennis Koch18d ago
Looks better. Does it show up in your Third party panel?
L
L!am18d ago
no i don't see it on my website or isn't that what you meant?
DK
Dennis Koch18d ago
"On my website" is pretty broad. You are viewing the "third party" panel, right?
L
L!am18d ago
doesn't show here
No description
DK
Dennis Koch18d ago
What's the URL of the page you are on?
L
L!am18d 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
DK
Dennis Koch18d ago
i don't know if you can see it
Nope. That would be pretty bad 😉
L
L!am18d ago
🤣 true
DK
Dennis Koch18d ago
I assume /org belongs to the "org" panel. But you just created the resource for "third party"?!
L
L!am18d ago
yes
DK
Dennis Koch18d ago
So why should it show up for org?
Solution
DK
Dennis Koch18d ago
If you want the resource for your org panel, you should create it for org and not third party
DK
Dennis Koch18d ago
Every panel has it's own url via that it's accessed.
L
L!am18d 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
L!am18d 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
DK
Dennis Koch18d ago
I guess that's the highlighting for version control in VSC 😉
L
L!am18d 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
More Posts
How to translate filament filepond placeholder?I've tried to find it in the vendor, but idk how to translate itFill Select on relationmanager creation formHow can i pre-fill parent relation selector on a create form on a relationmananger? On the Practice Help with github actionsI copied the workflow file from filament: ```yml name: phpstan on: push: pull_request: jobs: File upload preview green gradientHow do I remove the green gradient so that I can see the whole logo while uploading it ? ```<?php Export to Excel - sub folder does not get url correctly.My app referer to the sub directy as : domain.com/demo/meterbill -> link to public folder in LaravelHow I can create Form or Table in another classF.E I want to create another class with form or tableUpdate each repeater field 2 fields outside the repeaterI'm playing around with creating a invoice in Filament and I've created a form that has multiple fieCan't access User profile "isSimple:false" on Team tenantHi. Trying to get to User's profile (http://app.test/dashboard/profile) This works public functHow to handle API error response?I have a resource, once you have create/update/delete action, it will call an API endpoint. How can Select Filter List TruncatedHi Guys, I have a select filter which has more then 50 options, however the list has been truncated Column relationships problemHey ! In a relation manager resource, i have this code : ```public function table(Table $table): custom themeHello, when I create a custom theme (php artisan make:filament-theme) and configure my vite.js fToggle-columnIs there any way to make toggle-column from scratch on a custom page ?$getAction() and visibilityWhen using ->registerActions() on a Form or Infolist component, it seems that visible() and hidden()Modal action or table inside formMy use case is a CRM application where each resource only has an edit screen. A list of related resoCustomizing Data Insertion with Filament's Import ActionHello, Regarding the import: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import Is iCount SaleItems sold by Product IDHello, I have a Sales Resource with (hasMany) SaleItems Resource which selects a product to sell froMissing required parameter for View routeI have just found out the wonder of Repeaters, and after adding one to a form, the first time I submDownloadable() and Openable() gives me 404 errorhello! I am currently creating our system and the downloadable() and openable() syntax in my filamenhow to add external url in navigationi want to add external url in my navigation sidebar. but i find a way for a specific resource. what