I was wondering if I could load another resource's $form into the
--simple
--simple
modal of a different resource? Use case: I can quickly access resource views quickly such as comment threads (from dash) related to other models...rather then having to go to that resource table, find the record with comments, click through...etc.. Having a table of comments is not very useful, but clicking through to the record where all of the comments exist on the related model is more useful I believe.
From my attempts the trick seems to be associating the model record with the form, while inside of another resource. Not sure how to do this.
An example from my code is:
//IllustrationSketchesRelationManager::form holds the form fields AND Model-Record I'd like to reuse. public static function form(Form $form): Form { return IllustrationSketchesRelationManager::form(new \Filament\Resources\Form(); }
//IllustrationSketchesRelationManager::form holds the form fields AND Model-Record I'd like to reuse. public static function form(Form $form): Form { return IllustrationSketchesRelationManager::form(new \Filament\Resources\Form(); }
I'm referencing the form above, but it obviously has no awareness of the correct model. Are there any methods that allow passing in the correct model/record? OR maybe I'm thinking about this incorrectly, or it's quite possible that this is not even possible with filament.