Mdk
Including a relationship form from a different Resource doesn't display repeater items in it
I'm trying to cut down on my duplicated code, so inside a
OrderResource
I created this method
Calling it from the OrderResource
itself works fine, but now I'm also adding it to a different resource, ShipmentResource
Thing is, the order details are displayed fine, the discount and total as well, but the repeater is not showing at all (unless I make it non-disabled, then the add button appears)73 replies
Filling a SpatieMediaLibraryImageEntry field programmatically on a new Model (not saved yet)
I'm trying to set up a "cloning" functionality where the user can pick an existing Item and make a copy that he can edit before saving it as his own
I made a copy of the
CreateRecord
page that accept an extra param (the ID of the item to be cloned) and added this
So far so good, but my Items also have images attached, via the SpatieMediaLibrary plugin, and I can't find a way to bring the original item's images in the form
I thought about persisting the item to the database and then using the EditRecord
page but that would be extra clutter in case the user doesn't actually save his item anymore
Any other way to auto-fill that field from existing images (that would then have to be copied over to new Model as well)?8 replies
Custom Action that calls "save" doesn't actually save the model
So I'm trying to put a save button elsewhere in an Edit page
Both
payment_method
and balance_used
are properties of the model that is being edited
I tried with both submit('save')
as well as action('save')
, they both trigger the validation and display the success notification, but the model is not updated and neither protected function beforeSave()
or protected function afterSave()
are called.. what am I doing wrong?
My plan was to save the order and then redirect to the payment page in the afterSave
method, I would've used a custom action but I couldn't manage to trigger the validation with that5 replies
Custom theme missing some default classes
Brand new installation (but this happened on previous setups too), I just made a custom theme and as soon as I switch to it, the various items' gray borders disappear, be it the small search input above the tables or the whole container that holds the table itself
I've narrowed it down to not having these 2 declarations in my CSS:
My tailwind config is the default one, adapted just the paths to my custom panel (shop), but these classes should be in the default filament blades, not custom ones
23 replies
Filament + Jetstream + multiple LDAP domains, how to login?
I'm currently trying to set up Filament along a Jetstream with a multi domain LDAP login system
So far, Jetstream's login page has been edited to include a domain selector, and the login works fine, I get redirected to the
/dashboard
page on a successful attempt
I'm now trying to put Filament in the mix, but as soon as I try to access its path, I get 302'd to /login
and then back to /dashboard
since the user is indeed logged in, but Filament refuses to recognize the session70 replies
Preload a relationship select if a parent select has a value
I'm currently creating a form where the user can pick an item, either by starting from the very first category and filtering it down or just searching in the entire catalogue
Each select is searchable, and results are filtered according to the previous one (if something is selected), but for added user-friendlyness I'd like to also show the first 50 or so items in child selects if they're already filtered down
I tried using
->preload(fn($get) => $get('category_id'))
on a child select with and without ->live()
but neither had any impact2 replies
Empty CSS when creating a new theme, not extending the default
was trying to create a new theme to overwrite just a few rules, followed all the instructions but I'm getting a basically empty CSS file
resources/css/filament/admin/theme.css:
That first link (theme.css) contains just this:
That one, if opened, contains this:
I did run build, but as soon as I add
->viteTheme('resources/css/filament/admin/theme.css')
to the AdminPanelProvider I'm getting the ugliest site ever
What am I missing?52 replies
Setting recordUrl(null) on a table that has an EditAction among its action doesn't disable the click
I haven't had time to fully test this, but my scenario is this:
I wanted to disabled the row click, but using
->recordUrl(null)
doesn't work, UNLESS i remove the EditAction as well (the custom action doesn't seem to have any influence in all of this)
Is this an expected behaviour? I want to keep the edit action in the last column while not giving the user the option to click the whole row4 replies
Show related entity's details in an RelationManager edit modal
I have 3 entities, Customer, Product and Wishlist, with the latter having both product_id and customer_id in it
I'm trying to show a customer's wishlist in its details page, which works fine inside the RelationManager table by just using product.title and product.price, but when I go edit this relation those 2 fields are emtpy (while other fields that are directly on the wishlist table are shown fine)
What am I missing here? Why does it work in the table but not in the form?
6 replies
How to display and update pivot field in attach/edit form?
I've got a table, Places, that has a name and a description fields among other, and it's linked to an Itinerary table through a pivot, Itinerary_Place.
This pivot table also has both name and description, so I can override the default ones when attaching a place to an itinerary.
I can't find a way to display AND update the pivot name/description though, I can either display it by using
make('pivot_name')
but then it fails when it's time to save, or I can use make('name')
and it'll update the correct field in the pivot table but it will always display the place's original name (same goes for the description)
What am I missing?6 replies