Return Table will not show morphtoselect
In my OrderRelationManager i have a relation to my ProductRevision and ItemList but i can't get it done to show the information on the website. Could someone help me and tell me what i should change to show the information
14 Replies
i know i have to use GitHub Gist for longer scripts but i use gitlab so idk how to use that
if more detail is needed just tell me
?? anyone
You haven't explained yourself. You say it's not showing right information, but nbot showing what it should show, nore are you showing the resource or the model with it's relationships. you need to provide more detaiuls.
This is the Resource, the thing that needs to show is my 'product_id' (from ProductRevision model) and my 'name' (from ItemList model)
this is my ProductRevision model
and this is my ItemList model
in my OrderRelationManager i am trying to show these 2 lines on the website
So when you view/edit the order you will see your relation manager at the bottom, do you see any rows of products? If not, then you relationship isn't working.
i do see the rows, this is what i see at the bottom
so don't you want productRevision.id ?
yes i do want that i want to call up the 'product_id' from the productrevision model same with itemlist there it is the 'name'
but everything i try it will just not show up under the header Product revision and Item list on the website
So where code is, I assume that is a product, that is then the product model, to get the productRevisrion you'd call the relationship on the model so that would be: productRevision.product_id ? Being:
Product -> Product Revision -> product id
i don't know if the productRevision.product_id line is good i just found something on the internet and was trying it but before that it was just product_id but the same problem not showing up on the website
that line is infact not good btw
do you know how i could fix this?
if you do ->formatState(fn($state, $record) => dump($state) . dump($record)) what happens on the column?/
i get this error when i add that behind the column
i have no clue why that error is there
someone pls help 😄
try