Suicidalpain
Suicidalpain
FFilament
Created by Suicidalpain on 1/17/2024 in #❓┊help
Multiple Dataset Chat Bar columns in widget and per month.
I'm trying to migrate my dashboard that i did with chart js on Filament , and i have this code , What i wanna do is this: having multiple dealers (Concesionarios) per month and the sum of some data for each month and each dealer
The mode is a View that already have a group by and order by date , also it will be nice if i can filter by date range, disable enable dealers $datos = CantidadCanjesXConcesionario::all(); $concesionariosChart = $datos->groupBy('Concesionario'); $groupedFecha = $datos->groupBy('Fecha')->keys()->toArray(); $concesionariosChart = collect($concesionariosChart); $groupedFecha = collect($groupedFecha); $Chartdata = [ 'datasets' => $concesionariosChart->map(function ($value, $key) use($groupedFecha) { return [ 'label' => $key, 'backgroundColor' => $this->ConcesionarioColors[$key] ?? [], 'data' => $groupedFecha->map(function ($fecha) use ($value) { return $value->where('Fecha', $fecha)->pluck('Cantidad')->first() ?? 0; })->toArray() ]; })->toArray() ]; return [ $Chartdata ];
1 replies
FFilament
Created by Suicidalpain on 9/23/2023 in #❓┊help
ImageColumn disk usage and better in docs or lacks of it. subfolder structure
Hi Guys. Question , i have this structure in storage folder , storage/app/public/uploads/banners , but i can't find any doc on how to setup this on filament , i mean , i make another disk pointing to this directory called banners , 'banners' => [ 'driver' => 'local', 'root' => storage_path('app/public/uploads/banners'), 'url' => env('APP_URL').'/banners', 'visibility' => 'public', ], also i made another storage link but nothing is working or showing in the table. i'm using the disk() method in the table and the Image Column property but also no luck. the image is stored in the database without any url and just the filename and extension. also Filament has some debug tools to implement to i can know what is retrieving all those methods ?
186 replies