JonVonWeston
JonVonWeston
FFilament
Created by Nuhel on 9/24/2023 in #❓┊help
How to perform action before saving relationships?
👍
6 replies
FFilament
Created by Nuhel on 9/24/2023 in #❓┊help
How to perform action before saving relationships?
This was in the 'Edit' page of my resource
6 replies
FFilament
Created by Nuhel on 9/24/2023 in #❓┊help
How to perform action before saving relationships?
Hiya - I've latched into mutateFormDataBeforeSave - I was able to add and remove items from the data array before it was all persisted. I'm assuming you could do whatever you need to do at that point?
6 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
thanks for the heads up
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
ah - possibly - I'll take a look
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
Thats the approach I'm trying - properties[property_id] = value
18 replies
FFilament
Created by JonVonWeston on 9/22/2023 in #❓┊help
Relation manager - embed in form?
Makes sense - sounds like spooky magic!
8 replies
FFilament
Created by JonVonWeston on 9/22/2023 in #❓┊help
Relation manager - embed in form?
"@teleport Livewire v3 will also include a new @teleport Blade directive that will allow you to "teleport" a piece of markup and render it another part of the DOM. This can sometimes help avoid z-index issues with modals and slideouts. In Filament v2, you are unable to embed the table builder within the form builder. The most useful application for this is putting a relation manager inside a resource form in the admin panel. This is due to a limitation with HTML, as it doesn't allow nested <form> elements. This new teleport feature will allow us to teleport the nested <form> elements away, and provide you with this feature!"
8 replies
FFilament
Created by JonVonWeston on 9/22/2023 in #❓┊help
Relation manager - embed in form?
Yeah that was the issue - there was a mention of using @teleport - part of Livewire3
8 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
I'm using category to define the type - reason for this is to allow for hierarchial categories - Trailer -> Flat Bed -> 2 wheel, and the user is able to assign properties relevant to each of those cateogies and when I create the product I traverse that hierachy and create a list of properties that apply to a 2 wheeled flat bed trailer.
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
(but a fun one!)
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
its a complex problem!
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
The properties are dynamic on a product - so for a vehicle they could have a set of properties vin / engine size etc. but for trailer might be a different set of properties - load capacity / powered brakes etc. and they may want to add a new property later on - colour for example that can be relevant on both cars, trailers and horseboxes say
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
from my understanding a repeater is exactly that - repeating blocks of controls
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
Don't think so - although the majority of child properties are boolean - such as power steering , abs etc. some are inputs - registration number, or selects - fuel type etc. I also want to spread the properties across multiple tabs - vehicle, interior features, exterior features etc.
18 replies
FFilament
Created by JonVonWeston on 9/20/2023 in #❓┊help
Advice required: Form editing / saving Parent and many children
Hi Patrick - 1 to many - so a product has a category - ie a vehicle can be a hatchback and a vehicle can have many properties - colour, engine size, cruise control etc.
18 replies
FFilament
Created by JonVonWeston on 9/19/2023 in #❓┊help
Advice required - Relationship Management
Ignore me - just found the Actions/Attach method - happy days.
3 replies
FFilament
Created by JonVonWeston on 9/14/2023 in #❓┊help
spatie media library - multiple image fields on a resource
Thats created a separation of concerns.
4 replies
FFilament
Created by JonVonWeston on 9/14/2023 in #❓┊help
spatie media library - multiple image fields on a resource
Forms\Components\Tabs\Tab::make('Images') ->schema([ SpatieMediaLibraryFileUpload::make('preview') ->collection('preview'), SpatieMediaLibraryFileUpload::make('icon') ->collection('icon'), SpatieMediaLibraryFileUpload::make('images') ->collection('images') ->multiple() ]),
4 replies
FFilament
Created by JonVonWeston on 9/14/2023 in #❓┊help
spatie media library - multiple image fields on a resource
Apologies - I have just read about collections and that has done the trick - so my schema definition now looks like
4 replies