© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
10 replies
gladjanus43

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:
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

csv import creating data in multiple models
FilamentFFilament / ❓┊help
2y ago
Import Action
FilamentFFilament / ❓┊help
2y ago
Action Import
FilamentFFilament / ❓┊help
2y ago
Multiple login models
FilamentFFilament / ❓┊help
3y ago