F
Filamentโ€ข11mo ago
SirAlyon

Issue with HTTP ERROR 500 when using "->groupsOnly()" method

Hello everyone, I'm currently facing an issue and I'm struggling to understand why. Whenever I attempt to use the "->groupsOnly()" method to load closed groups in the table, it leads to a complete project breakdown with an "HTTP ERROR 500". Without utilizing this method, everything works flawlessly. Below, I've included the context in which I'm trying to implement it (following the documentation): --- Code below in the comment (too many characters) --- Any insights or assistance would be greatly appreciated! Thank you ๐Ÿ™‚
11 Replies
SirAlyon
SirAlyonOPโ€ข11mo ago
return $table
->columns([
Tables\Columns\TextColumn::make('cisin')
->label('ISIN')
->searchable()
,
Tables\Columns\TextColumn::make('ifile_dimensione')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('chttp_code')
->searchable()
->sortable()
->badge()
->summarize(Sum::make()),
Tables\Columns\TextColumn::make('tuts')
->dateTime()
->sortable(),
])
->defaultGroup('lunivid_serie')
->groupsOnly() //<- this is not working :(

->groups([
Group::make('lunivid_serie') //Raggruppo in base alla relazione
->label('N. Serie')
->collapsible()
->orderQueryUsing(
fn (Builder $query, string $direction) => $query->orderBy('lunivid', 'desc')
),
])
return $table
->columns([
Tables\Columns\TextColumn::make('cisin')
->label('ISIN')
->searchable()
,
Tables\Columns\TextColumn::make('ifile_dimensione')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('chttp_code')
->searchable()
->sortable()
->badge()
->summarize(Sum::make()),
Tables\Columns\TextColumn::make('tuts')
->dateTime()
->sortable(),
])
->defaultGroup('lunivid_serie')
->groupsOnly() //<- this is not working :(

->groups([
Group::make('lunivid_serie') //Raggruppo in base alla relazione
->label('N. Serie')
->collapsible()
->orderQueryUsing(
fn (Builder $query, string $direction) => $query->orderBy('lunivid', 'desc')
),
])
SirAlyon
SirAlyonOPโ€ข11mo ago
No description
SirAlyon
SirAlyonOPโ€ข11mo ago
Without that method it's working fine...
No description
toeknee
toekneeโ€ข11mo ago
Please enable error reporting to get a more detailed error.
SirAlyon
SirAlyonOPโ€ข11mo ago
You mean the classic laravel exception?
toeknee
toekneeโ€ข11mo ago
No, the classic laravel debug mode which will trigger the stack trace
SirAlyon
SirAlyonOPโ€ข11mo ago
It is already active. I can see other errors.
No description
SirAlyon
SirAlyonOPโ€ข11mo ago
The method "->groupsOnly()" does not trigger this debug interface, its just an HTTP ERROR 500
toeknee
toekneeโ€ข11mo ago
Check your server 500 error logs
SirAlyon
SirAlyonOPโ€ข11mo ago
Oh, ty!
2024/01/09 14:07:46 [error] 411380#411380: *35355 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/alby/pautoimporta/vendor/laravel/framewo>
2024/01/09 14:07:46 [error] 411380#411380: *35355 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/alby/pautoimporta/vendor/laravel/framewo>
Anyway how is it possibile, it's just a single method ๐Ÿ˜ฎ
toeknee
toekneeโ€ข11mo ago
Increase your memory allocation.
Want results from more Discord servers?
Add your server