Can't `$this->form->fill()` images in custom Livewire Page while using Repeater

in my
public function mount(): void

i'm trying to fill app_intro_image's in app_screens

$this->form->fill([
            'app_home_page_order' => json_decode($this->user-
>getAppSetting('app_home_page_order'), true),
            'app_general_title' => $this->user->getAppSetting('app_general_title'),
            'app_screens' => $appScreens,
        ]);

output data that is being filled.
array:3 [▼ // app/Filament/AppPanel/Pages/AppSettings.php:76
  "app_home_page_order" => array:2 [▶]
  "app_general_title" => "Stack App"
  "app_screens" => array:1 [▼
    0 => array:4 [▼
      "app_intro_id" => "f8dff274-3408-4d7a-a359-0e4cac89b0e4"
      "app_intro_title" => "1st new"
      "app_intro_description" => "Nice Feature"
      "app_intro_image" => "http://myapp.test/storage/16/appify-logo-white.svg"
    ]
  ]
]

Here is what my data state looks like after page is rendered on browser.
  +data: array:3 [▼
    "app_home_page_order" => array:2 [▶]
    "app_general_title" => "Stack App"
    "app_screens" => array:1 [▼
      "2f70d635-e64f-4f7c-832b-67cf019dec2e" => array:4 [▼
        "app_intro_id" => "f8dff274-3408-4d7a-a359-0e4cac89b0e4"
        "app_intro_title" => "1st new"
        "app_intro_description" => "Nice Feature"
        "app_intro_image" => []
      ]
    ]
  ]


http://myapp.test/storage/16/appify-logo-white.svg perfectly accesible from browser.

Context i have been experiencing same issue for a year now here is - reproducible repo
https://github.com/RizwanNaasir/filament-form-issue
and related issue that was closed without any further solution.
Screenshot_2023-12-13_at_12.05.37_PM.png
GitHub
Contribute to RizwanNaasir/filament-form-issue development by creating an account on GitHub.
GitHub
Package filament/forms Package Version v2.16 Laravel Version v9.46 Livewire Version v2.10.8 PHP Version PHP 8.1 Problem description This Repo contains minimal reproduction of issue in Filament/Form...
Solution
I was missing call to my actual ->model() instance on SpatieMediaLibraryFileUpload componet.

e.g

SpatieMediaLibraryFileUpload::make('app_intro_image')
                                    ->collection('my-collection')
                                    ->hiddenLabel()
                                    ->columnSpan(2)
                                    ->required()
                                    ->model($this->appIntro'),
Was this page helpful?