giuszeppe
giuszeppe
FFilament
Created by giuszeppe on 7/11/2024 in #❓┊help
ImageColumn not setting src attributes
TextColumn::make("id")
->label("ID"),
TextColumn::make("name")
->label("Nome"),
TextColumn::make("real_price")
->money('EUR')
->label("Prezzo"),
ImageColumn::make('image_path')
->getStateUsing(fn (Product $product) => $product->image_path)
->defaultImageUrl('/assets/images/default.png')
->label('Immagine')
TextColumn::make("id")
->label("ID"),
TextColumn::make("name")
->label("Nome"),
TextColumn::make("real_price")
->money('EUR')
->label("Prezzo"),
ImageColumn::make('image_path')
->getStateUsing(fn (Product $product) => $product->image_path)
->defaultImageUrl('/assets/images/default.png')
->label('Immagine')
I have this code and I'm trying to display an image using imageColumn. The issue is that no src is being set in the image in the HTML and I really don't know how to debug it. When dumping the values in getStateUsing the value of the path is correct, however, it is not being set on the html as you can see:
<img src="" style="height: 2.5rem;" class="max-w-none object-cover object-center ring-white dark:ring-gray-900">
<img src="" style="height: 2.5rem;" class="max-w-none object-cover object-center ring-white dark:ring-gray-900">
I have no idea on how to debug it, I'm using Filament v3.2.92
4 replies
FFilament
Created by giuszeppe on 2/3/2024 in #❓┊help
koncco filament import hangs while importing 190kb files
Hello guys, I'm using koncco filament import to import a CSV file with relatively small size (200kb), but it just hangs forever. I tried to load also the xlsx one, but it gives me error about zip folder structure, so no luck here. My code is really simple and it does work with smaller files. I already tried increasing the memory amount and maxtime in PHP.ini
3 replies
FFilament
Created by giuszeppe on 11/23/2023 in #❓┊help
Section columns blade component
Hello, is there a way to fit three section (blade components) into three columns instead of rows?
5 replies
FFilament
Created by giuszeppe on 8/25/2023 in #❓┊help
Typed property Filament\Forms\Components\Component::$container must not be accessed
Hi, i'm trying to hide a column with a Closure filter to hide it when it is null. Code is the following
Tables\Columns\TextColumn::make('fax')
->searchable()
->hidden(fn(\Filament\Forms\Get $get) => $get("fax") === null),
Tables\Columns\TextColumn::make('fax')
->searchable()
->hidden(fn(\Filament\Forms\Get $get) => $get("fax") === null),
10 replies
FFilament
Created by giuszeppe on 8/24/2023 in #❓┊help
Hiding columns with null value
How can I hide columns with null values without rewriting the same Closure logic every time?
2 replies
FFilament
Created by giuszeppe on 8/24/2023 in #❓┊help
Target Closure not Instantiable
Hi, I've encountered the error stated in the title from this very simple code.
->columns([
\Filament\Tables\Columns\TextColumn::make("denomination"),
\Filament\Tables\Columns\TextColumn::make("phone"),
\Filament\Tables\Columns\TextColumn::make("email"),
\Filament\Tables\Columns\TextColumn::make("p_iva")
->hidden(fn(Closure $get) => $get("p_iva") === null),
])
->columns([
\Filament\Tables\Columns\TextColumn::make("denomination"),
\Filament\Tables\Columns\TextColumn::make("phone"),
\Filament\Tables\Columns\TextColumn::make("email"),
\Filament\Tables\Columns\TextColumn::make("p_iva")
->hidden(fn(Closure $get) => $get("p_iva") === null),
])
Do you know why? Specifically, the error is:
Illuminate \ Contracts \ Container \ BindingResolutionException
PHP 8.2.9
10.20.0
Target [Closure] is not instantiable.
Illuminate \ Contracts \ Container \ BindingResolutionException
PHP 8.2.9
10.20.0
Target [Closure] is not instantiable.
Thanks in advance!
5 replies