gladjanus43
ViewField in repeater with record data in livewire component
I have a repeater where I have overwritten the add action with a modal. I want to use the Simple layout of the repeater and use a custom viewField with the data of the records. Does anyone know how to pass the data into the viewField? I only want to nicely show the information in the repeater, no logic is applied to the field so I dont think I need a custom field class
Best case I think would be to pass the record to the viewData() property but I cant figure out how to acces the current record of the repeater
5 replies
Execute filament commands inside a filament plugin
Hi, I am making a filament plugin which includes resources, models, relationmanagers, etc...
Is there a possibility to use the filament commands like make:filament-resource inside the package folder and it creating the files in the correct place? I have a src folder, and currently I am copying everything from the main app to the plugin but this is not a very nice way of working...
I allready tried adding a path to the command like /packages/.../.../SomeResource but this still places it in the app folder
Thanks!
4 replies
HasManyThrough repeater relation
I am having the following problem where I want to show results in a repeater from a hasManyThroug relation
Transport Route
id
Transport Order
id
transport Route Id
...
Transport Stop
id
transport order id
...
I want to retrieve the stops in a repeater so I have a draggable list to let the user sort its desirered order for the stops. The has many through relation works on a relationmanager but not in the repeater because it only accepts HasOneOrMany or BelongsToMany
Is there a way arround this to display all stops in the transport route resource?
5 replies
Import action multiple models
Hi, I am working with an importer class. My use case is that one csv is converted to multiple models.
For example one row contains a card number. I first want to insert the card to retrieve a card_id.
I have the following models which need to be inserted based on this csv:
- cards
- cars
- stations
- countries
- and the main one which are rows, containing foreign keys to all the above.
I know I can use the relationship method column but the problem is that for example cars is build up from license_plate. It is only needed in the cars relationship.
I am currently trying this approach, but was wondering if I am doing it wrong:
11 replies
Checkbox List, select at least one
Hi, I have a checkbox list where at least one checkbox needs to be selected. I thought it would be easy using the required but it is allowing me to save the form without one checkbox selected
The checkboxlist is in a custom livewire component
I also tried adding
But I cant get this working either. It never even validates the thing
14 replies
Livewire custom actions
Hi, I have a custom page based on the kanban plugin of Mokosh. I am trying to add quick actions to the cards of the kanban board and would like to use the default filament actions.
The problem is that I have one action per card working, but when I try to add the second one it does not register the action. I have posted the code for the actions below. Is there some restriction or am I doing something wrong? Help would be appreciated!
5 replies
Add requiresConfirmation to custom livewire form when saving
I have a livewire component with a wizard form schema. When saving the form I want to let the user confirm their inputs by using the requiresConfirmation dialog. Is there a way to add it to the save method of the livewire component or directly to the
Thanks!
2 replies