F
Filament13mo ago
Sidem

get back the categorie in my Ressource Page

Hi ! I would like to know if it's possible to get back the 'categorie' in my front : ChartRessource/Pages/ListChart.php :
public function getTabs(): array {
return [
'2022' => Tab::make()
->modifyQueryUsing(fn (Builder $query) =>
$query->with('demande')
->whereHas('demande', function($query) {
$query->where('etablissement_id', auth()->user()->etablissement_id );
})
),
];
}
public function getTabs(): array {
return [
'2022' => Tab::make()
->modifyQueryUsing(fn (Builder $query) =>
$query->with('demande')
->whereHas('demande', function($query) {
$query->where('etablissement_id', auth()->user()->etablissement_id );
})
),
];
}
And there is where i want to get back "2022" :
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('nom')->label('Etablissement')->searchable()->sortable(),
BudgetPrevChart::make('')->label('Budget Prev'),
CountEtablissementChart::make('id')->label('Nombre de demande par établissement'),
])
....
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('nom')->label('Etablissement')->searchable()->sortable(),
BudgetPrevChart::make('')->label('Budget Prev'),
CountEtablissementChart::make('id')->label('Nombre de demande par établissement'),
])
....
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server