Form with no model
We have to process uploads on a regular basis. So far we've cheated and put the form upload into one table (model) and the data into another table (model). But we have several cases where we simply don't need to store the file. We want the data inside the file import into a model. For example we have a CSV with serial numbers and want to import them into a model called serial numbers.
I don't think the right thing to do is put a form field on the serial number model. What I've done so far is simply hooked into the saved event for the model and parsed the upload and saved it to the data table for that file model.
I think we could accomplish the same results by creating a custom page with a custom widget that has the file upload form on it. And then simply clean parse the file (either via queue or inline if small). Just want to make sure I'm on the right track here before we get too far into these projects.
Anyone done this and happen to have an example? This need comes up super often.
We are using the entire Filament suite (admin panel, form builder, table builder and notifications, just for reference). Everything is inside the Admin Panel.
I don't think the right thing to do is put a form field on the serial number model. What I've done so far is simply hooked into the saved event for the model and parsed the upload and saved it to the data table for that file model.
I think we could accomplish the same results by creating a custom page with a custom widget that has the file upload form on it. And then simply clean parse the file (either via queue or inline if small). Just want to make sure I'm on the right track here before we get too far into these projects.
Anyone done this and happen to have an example? This need comes up super often.
We are using the entire Filament suite (admin panel, form builder, table builder and notifications, just for reference). Everything is inside the Admin Panel.