nowak
nowak
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
Thank you @Leandro Ferreira! Herd php 8.2 is still at 8.2.20, so I'm hoping this will be fixed in 8.2.21 when it reaches Herd 🙇‍♂️
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
Yes I am
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
No description
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
No description
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
I know, but I have no idea how to debug this error since it points to a symfony/laravel source file :/
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
It doesn't, I get this error after 1-3 seconds from refreshing the page.
16 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
It is really any resource list page, to share a simple resource page, it could be my MealTypeResource which I have attached. I get the error less frequently on edit pages of individual records, but it still occurs. Increasing the max execution time to 60 seconds seems to help suppress the error quite a bit, thanks for sharing that!
16 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
Is it possible to create a Filament settings page with a tabbed form, for multiple settings groups?
app/Filament/Pages/ManageSettings.php
15 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
Is it possible to create a Filament settings page with a tabbed form, for multiple settings groups?
Thanks! I managed to do it, but I still copied the blade view that the SettingsPage uses, and used it for my ManageSettings page. I tried to get the submit button to be tab specific, but gave up on this in the end, and just checked if the submitted settings have changed, and then only save the changed settings to the database to keep timestamp integrity. To keep adding and removing settings classes to and from tabs simple, I added an interface for my settings classes, and added tab name, schema, and tab order parameters directly to the settings classes to be used by the filament tabbed settings page. Then the settings page looks through all classes that implements the interface, and builds the tabs dynamically from these. app/Settings/Contracts/SettingsTabInterface.php:
<?php

namespace App\Settings\Contracts;

interface SettingsTabInterface
{
public static function tabName(): string;
public static function schema(): array;
public static function tabOrder(): int;
}
<?php

namespace App\Settings\Contracts;

interface SettingsTabInterface
{
public static function tabName(): string;
public static function schema(): array;
public static function tabOrder(): int;
}
an example app/Settings/GeneralSettings.php
<?php

namespace App\Settings;

use App\Settings\Contracts\SettingsTabInterface;
use Filament\Forms;
use Spatie\LaravelSettings\Settings;

class GeneralSettings extends Settings implements SettingsTabInterface
{
public string $site_name;
public static function group(): string
{
return 'general';
}

public static function tabName(): string
{
return 'General';
}

public static function schema(): array
{
return [
Forms\Components\TextInput::make('site_name')
->label('Site Name')
->required(),
];
}

public static function tabOrder(): int
{
return 10;
}
}
<?php

namespace App\Settings;

use App\Settings\Contracts\SettingsTabInterface;
use Filament\Forms;
use Spatie\LaravelSettings\Settings;

class GeneralSettings extends Settings implements SettingsTabInterface
{
public string $site_name;
public static function group(): string
{
return 'general';
}

public static function tabName(): string
{
return 'General';
}

public static function schema(): array
{
return [
Forms\Components\TextInput::make('site_name')
->label('Site Name')
->required(),
];
}

public static function tabOrder(): int
{
return 10;
}
}
And my Filament settings page app/Filament/Pages/ManageSettings.php in next message
15 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
I can't seem to get it to work with the query parameters :/ I think I might have to use ->persistTab() instead of ->persistTabInQueryString() , as it seems this would store the tab in memory. I am just trying to figure out how to tab into this as well.
12 replies
FFilament
Created by nowak on 6/5/2024 in #❓┊help
How to trigger a custom action modal directly from a TextInputColumn updateStateUsing?
We can't have it all 🙂
41 replies
FFilament
Created by nowak on 6/5/2024 in #❓┊help
How to trigger a custom action modal directly from a TextInputColumn updateStateUsing?
Wow! thank you! It seems like this is the only way, and this solves the issue.
41 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
But the url parameters still update, is there no way to tap into that and react to the change from my custom page? Or do I have to write my own blade view for this?
12 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
I don't know if it changes anything, but I am doing this in a custom page class ManageSettingsNew extends Page
12 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
You mean adding $livewire directly to the hidden() callback like this:
Action::make('saveBusinessHours')
->label('Save Business Hours')
->action(fn () => $this->saveBusinessHours())
->hidden(function ($livewire, $currentTab) {
\Log::info("Hiding Tab Actions", ['livewire' => $livewire]);

return $currentTab !== 'settings-tabs-business-hours-tab';
}),
Action::make('saveBusinessHours')
->label('Save Business Hours')
->action(fn () => $this->saveBusinessHours())
->hidden(function ($livewire, $currentTab) {
\Log::info("Hiding Tab Actions", ['livewire' => $livewire]);

return $currentTab !== 'settings-tabs-business-hours-tab';
}),
The log output gives me this:
{
"App\\Filament\\Pages\\ManageSettingsNew": {
"mountedActions": [],
"mountedActionsArguments": [],
"mountedActionsData": [],
"defaultAction": null,
"defaultActionArguments": null,
"componentFileAttachments": [],
"mountedFormComponentActions": [],
"mountedFormComponentActionsArguments": [],
"mountedFormComponentActionsData": [],
"mountedFormComponentActionsComponents": [],
"mountedInfolistActions": [],
"mountedInfolistActionsData": [],
"mountedInfolistActionsComponent": null,
"mountedInfolistActionsInfolist": null,
"data": {
"business_hours": {
"c4b9ae01-7ade-4095-8405-305823da07cc": {
"day": "Monday",
"opens_at": "14:00",
"closes_at": "19:00",
"is_closed": false
},
},
"site_name": "My Awesome Site",
"billing_cycle": "bimonthly"
},
"savedDataHash": "88f37a53dd2b0b9626b2b0098ede5a62"
}
}
{
"App\\Filament\\Pages\\ManageSettingsNew": {
"mountedActions": [],
"mountedActionsArguments": [],
"mountedActionsData": [],
"defaultAction": null,
"defaultActionArguments": null,
"componentFileAttachments": [],
"mountedFormComponentActions": [],
"mountedFormComponentActionsArguments": [],
"mountedFormComponentActionsData": [],
"mountedFormComponentActionsComponents": [],
"mountedInfolistActions": [],
"mountedInfolistActionsData": [],
"mountedInfolistActionsComponent": null,
"mountedInfolistActionsInfolist": null,
"data": {
"business_hours": {
"c4b9ae01-7ade-4095-8405-305823da07cc": {
"day": "Monday",
"opens_at": "14:00",
"closes_at": "19:00",
"is_closed": false
},
},
"site_name": "My Awesome Site",
"billing_cycle": "bimonthly"
},
"savedDataHash": "88f37a53dd2b0b9626b2b0098ede5a62"
}
}
I couldn't find anything about the tab info, should I use $livewire differently?
12 replies
FFilament
Created by nowak on 6/5/2024 in #❓┊help
How to trigger a custom action modal directly from a TextInputColumn updateStateUsing?
Not yet, no :/
41 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
No because it's not the same tabs, unless I am mistaken. The activeTab is set by the getTabs() method, not by the Tab layout
12 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
When using the Tabs layout in custom page, how can I make an action react to tab changes?
bump
12 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
Is it possible to create a Filament settings page with a tabbed form, for multiple settings groups?
Would I have to write my own blade view as well?
15 replies
FFilament
Created by nowak on 6/11/2024 in #❓┊help
Is it possible to create a Filament settings page with a tabbed form, for multiple settings groups?
I will give it a go, thanks!
15 replies