Ramon.vV
Ramon.vV
FFilament
Created by Ramon.vV on 3/11/2024 in #❓┊help
FooterActions method not present in Filament\Forms\Components\Section;
For some reason, I have no footerActions method inside this class. According to the docs, this should be correct:
use Filament\Forms\Components\Section;

Section::make('Moderate Request')
->footerActions([
Action::make('test')
->action(function () {
// ...
}),
])
use Filament\Forms\Components\Section;

Section::make('Moderate Request')
->footerActions([
Action::make('test')
->action(function () {
// ...
}),
])
Which already gives me the following error: Method Filament\Forms\Components\Section::footerActions does not exist. The docs clearly state to add this use use Filament\Forms\Components\Section; https://filamentphp.com/docs/3.x/forms/layout/section#adding-actions-to-the-sections-footer I checked the Section class but there is no function regarding footerActions there. Are the docs outdated in this regard, or what's happening here? 🤔
1 replies
FFilament
Created by Ramon.vV on 3/7/2024 in #❓┊help
Select Field Component State: Injecting Title along with ID
Hey all, Wondering if this is possible at all without formatting the state with ->formatStateUsing() I'm trying to fetch an ID from a request, which will subsequently inject the ID in the request into the Select Component. It's working, I have the correct ID, but I'm wondering if something like this is possbile:
->afterStateHydrated(function (Request $request, Select $component) {
$request = $request->all();
if (isset($request['page_id'])) {
$toplist = Toplist::scopeToplistByPageId($request['page_id'])->toArray();
$component->state([$toplist['id'],$toplist['title']]);
}
})
->afterStateHydrated(function (Request $request, Select $component) {
$request = $request->all();
if (isset($request['page_id'])) {
$toplist = Toplist::scopeToplistByPageId($request['page_id'])->toArray();
$component->state([$toplist['id'],$toplist['title']]);
}
})
Especially this line $component->state([$toplist['id'],$toplist['title']]); I don't think it's possible? I've also tried other variants like $component->state(['id' => $toplist['id'],'title' => $toplist['title']]); Anyone have any suggestions or should I just use formatStateUsing()?
2 replies
FFilament
Created by Ramon.vV on 12/8/2023 in #❓┊help
Hosting a website with FilamentPHP backend and Livewire frontend in a production environment
Hi all, I have been developing a website with the TALL stack, using FilamentPHP as the backend. First off thanks to all the devs for the hard work on the software, I'm really enjoying the development experience! My question is regarding hosting a website like this in a production environment. What would be the minimum requirements for the server? Having a hard time finding info about this. Specifically, I'm running into a PHP memory limit occasionally. Currently it is set at 1 GB. FYI, I have also implemented the Filament Fabricator package, which I'm using to make all my pages customizable in the backend. However, during the caching of these routes I'm often hitting the PHP memory limit (there are about 76,000 pages). As such, I requested my server provider if they could up the limit to 3GB. Now, the response I got was, 'we're not going to up the memory_limit to 3GB, that's just unrealistically high and would destabilize the server'. I would need to 'cut the process into smaller parts' to keep the memory usage lower. Since I have no reference for what the baseline memory usage is for such a website I was wondering if anyone could jump in that knows more about it? I'd like to know if it's realistic to have the memory_limit under 1GB before changing anything. Thanks in advance!
19 replies
FFilament
Created by Ramon.vV on 12/6/2023 in #❓┊help
Changing Brand Logo link
Hi all, I'm looking to change the link for the brand logo. I have noticed some older posts about this (V2.) The answers to these posts tell me I should change the link in the filament config. However, as of V3 it looks like this home_url variable no longer exists? I don't want the brand logo link to go to the panel, but to the home route, which is outside of any panel. Is there a way to achieve this in V3?
5 replies