w5m
w5m
FFilament
Created by w5m on 8/5/2024 in #❓┊help
Pass form data (`$state`) to `ChartWidget` in resource Create page
That's worked nicely - many thanks Leandro 👍
9 replies
FFilament
Created by w5m on 8/5/2024 in #❓┊help
Pass form data (`$state`) to `ChartWidget` in resource Create page
The action is defined in the footerActions of a form Section component.
9 replies
FFilament
Created by w5m on 8/5/2024 in #❓┊help
Pass form data (`$state`) to `ChartWidget` in resource Create page
I get the following error "Using $this when not in object context", so would I need to pass a closure in as the 2nd argument to the dispatch() method?
9 replies
FFilament
Created by w5m on 8/5/2024 in #❓┊help
Pass form data (`$state`) to `ChartWidget` in resource Create page
Thanks for your response @Leandro Ferreira
9 replies
FFilament
Created by w5m on 7/31/2024 in #❓┊help
Custom "Save" button to create or save a form
trait CanCreateOrSave {
/**
* Calls the appropriate method to either create a new record,
* or save changes to an existing record.
* This method name can be passed to an the ->action() method
* of an Action component.
*/
public function createOrSave(): void
{
if (is_subclass_of($this, \Filament\Resources\Pages\CreateRecord::class)) {
$this->create();
} else if (is_subclass_of($this, \Filament\Resources\Pages\EditRecord::class)) {
$this->save();
}
}
}
trait CanCreateOrSave {
/**
* Calls the appropriate method to either create a new record,
* or save changes to an existing record.
* This method name can be passed to an the ->action() method
* of an Action component.
*/
public function createOrSave(): void
{
if (is_subclass_of($this, \Filament\Resources\Pages\CreateRecord::class)) {
$this->create();
} else if (is_subclass_of($this, \Filament\Resources\Pages\EditRecord::class)) {
$this->save();
}
}
}
6 replies
FFilament
Created by w5m on 7/31/2024 in #❓┊help
Custom "Save" button to create or save a form
A big thank you for your suggestion @Leandro Ferreira - that's a nice way of doing it and I now have a better understanding of which methods the 'save' and 'create' strings were referring to. I slightly adapted the custom method you suggested to fit with my implementation (as I have an additional class named BaseCreateRecord which descends from CreateRecord and introduces some common functionality to child classes)...
6 replies
FFilament
Created by Luiz on 5/14/2024 in #❓┊help
How to show brand logo when sidebar is collapsed on desktop?
16 replies
FFilament
Created by Luiz on 5/14/2024 in #❓┊help
How to show brand logo when sidebar is collapsed on desktop?
Would an alternative solution be to move the brand logo out of the sidebar (the aside element) and into the topbar div element (after the expand & collapse sidebar buttons in the nav sub-element)?
16 replies