File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
src/Filament/Integration/Builders Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change 44
55use Filament \Schemas \Components \Grid ;
66use Illuminate \Database \Eloquent \Model ;
7- use Throwable ;
87
98final class FormContainer extends Grid
109{
@@ -48,22 +47,7 @@ public function only(array $fieldCodes): static
4847 private function generateSchema (): array
4948 {
5049 // Inline priority: explicit ?? record ?? model class
51- $ record = null ;
52- $ modelClass = null ;
53-
54- try {
55- $ record = $ this ->getRecord ();
56- } catch (Throwable $ throwable ) {
57- // Record not available yet
58- }
59-
60- try {
61- $ modelClass = $ this ->getModel ();
62- } catch (Throwable $ throwable ) {
63- // Model class not available yet
64- }
65-
66- $ model = $ this ->explicitModel ?? $ record ?? $ modelClass ;
50+ $ model = $ this ->explicitModel ?? $ this ->getRecord () ?? $ this ->getModel ();
6751
6852 if ($ model === null ) {
6953 return []; // Graceful fallback
You can’t perform that action at this time.
0 commit comments