table count status
I want to create a table that counts the number of lines by status of the 'Demande' database.
so I do this:
i you have any idees it will be nice
Thanks you !
so I do this:
i you have any idees it will be nice
public function table(Table $table): Table
{
return $table
->query(DemandeResource::getEloquentQuery())
->modifyQueryUsing(fn (Builder $query) =>
$query
->where('demandeur_id', auth()->user()->id))
->columns([
TextColumn::make('statut')
->summarize(Sum::make('statut')),
))
->defaultGroup('statut')
->groupsOnly();
}
}