Mdk
Mdk
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
forgot to go down yet another relationship
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
wait, nevermind, i'm the idiot in this case
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
this works and displays every field perfectly
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
Forms\Components\Group::make()
->relationship('order')
->schema([
Forms\Components\Section::make('Shipping address')
->relationship('customer')
->schema(
CustomerResource::getFormContent()
),
])
Forms\Components\Group::make()
->relationship('order')
->schema([
Forms\Components\Section::make('Shipping address')
->relationship('customer')
->schema(
CustomerResource::getFormContent()
),
])
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
Case in question: Shipment -> belongsTo(Order) -> belongsTo(Customer)
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
i'm getting all sort of weirdness when it comes to including relationship stuff
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
($record there being Order::class instead of Shipment::class)
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
apparently, when you're inside a group with a relation, $record is indeed the related model and not the original one
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
->content(fn($record) => $record->getProductsList()),
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
ok, this is gonna WOW you
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
tell you what, since the user isn't even supposed to edit order stuff from the shipment page, i'll just make a method on the Order model to generate an HTML recap of those products
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
that repeater just wants to stay empty
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
well, even duplicating isn't fixing it now
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
then again, i'm only using $record for debugging purposes there
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
well, that sure changes thing
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
oh
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
just a little later on I've got this, and it works
Forms\Components\Group::make()
->relationship('order')
->schema([
Forms\Components\Section::make('Shipping address')
->relationship('customer')
->schema(CustomerResource::getFormContent()),
])
Forms\Components\Group::make()
->relationship('order')
->schema([
Forms\Components\Section::make('Shipping address')
->relationship('customer')
->schema(CustomerResource::getFormContent()),
])
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
i thought that made it load the order relation and worked with that
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
but that's also why I added ->relationship('order') to the group
73 replies
FFilament
Created by Mdk on 3/29/2024 in #❓┊help
Including a relationship form from a different Resource doesn't display repeater items in it
no, orderResource uses Order, shipmentResource uses Shipment
73 replies