FilamentF
Filament2y ago
Pan

Images & Barcode not working when web hosted (Hostinger)

What I am trying to do:
I want the barcode from milon barcode to work properly and image to actually load. I can upload normally but it doesn't show the image in the tables.

What I did:
I tried running
php artisan storage:link
before uploading it to the hostinger files. It works locally, but on the hostinger it doesn't

Issues:
It works locally as shown in the images and does not in the hostinger when hosted despite running
php artisan storage:link
before uploading

However, we're not in the part of
public_html
folder, we just duplicated the
public_html
and create a
public
folder and we just uploaded the same exact files (the css wasn't working when that wasn't done and were not sure why). But the main issue really is the image and barcode not working properly.

Code:
barcode table column
                Tables\Columns\TextColumn::make('barcode')
                    ->url(fn(Equipment $record): string => route('barcode', ['barcode' => $record->barcode]))
                    ->openUrlInNewTab()
                    ->formatStateUsing(function ($record){
                        $barcode = DNS1D::getBarcodeHTML($record->barcode, 'C128');
                        return $barcode;
                    })->html(),

Image upload in form
                FileUpload::make('image')
                    ->image()
                    ->imageEditor(),

and Image column table
Tables\Columns\ImageColumn::make('image'),
image.png
image.png
image.png
image.png
Was this page helpful?