Multiple Filters and multiple columns #6
Sebastiangperez
started this conversation in
General
Replies: 2 comments 1 reply
-
@Sebastiangperez you can use multiple For filtering you can filter by range as well as by model e.g. |
Beta Was this translation helpful? Give feedback.
1 reply
-
One of my projects metric page: <?php
namespace App\Filament\Widgets\Admin;
use App\Models;
use Arr;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
use SaKanjo\EasyMetrics\Metrics\Trend;
class CountOverview extends BaseWidget
{
protected static array $models = [
Models\Admin::class,
Models\Manager::class,
Models\User::class,
// ...
];
protected function getStats(): array
{
return Arr::map(
static::$model,
fn (string $model) => Stat::make(class_basename($model), $model::count())
->chart(Trend::make($model)->countByMonths()->getData())
->color('primary')
);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a way that you can have multiple columns i mean , like most product sold by month but you can have multiple columns in one month or a range date ?
Also , can you filter by month and product ?
What about nested , like , brand -> product by month ?
Edit
I have something like this using chart js and laravel , how can mimic the same with your library ?
$Salespermonthchart = SalesperDealerShip::all(); // this is a view that came from a database grouping dealerships quantity of sales and for month
Also in the chart i have a min and max range date to select , full date.
Beta Was this translation helpful? Give feedback.
All reactions