Anthaas
Anthaas
FFilament
Created by Anthaas on 1/24/2024 in #❓┊help
Nullable dates in spatie/laravel-settings
Can anyone provide a basic example of how to define a settings class with a nullable date property? I have this:
class MySettings extends Settings
{
public ?DateTimeInterface $dateFrom;
public ?DateTimeInterface $dateFrom;

public static function group(): string
{
return 'dates';
}
}
class MySettings extends Settings
{
public ?DateTimeInterface $dateFrom;
public ?DateTimeInterface $dateFrom;

public static function group(): string
{
return 'dates';
}
}
and a Page which provides a form with DateTimePicker::make('dateFrom')->seconds(false)->native(false); but every time I try to save where there is a date set, I am getting an error saying:
Cannot assign string to property App\Settings\MySettings::$dateFrom of type ?DateTimeInterface
From reading the docs, I can't tell what else would be required? The global cast for DateTimeInterface is set up per the docs and default config publication.
17 replies
FFilament
Created by Anthaas on 1/22/2024 in #❓┊help
What is the best way to have Filament manage a single text entry?
I want the user to be able to set a piece of text, which can be managed within the Filament admin panel. There won't ever be more than 1 instance of this piece of text, so its not like I'm allowing multiple resources to be created. This piece of text will be shown globally, like a banner, across the site. Its either there, or not.
2 replies
FFilament
Created by Anthaas on 10/10/2023 in #❓┊help
Has anyone used the Google Analytics plugin on the Plugins section of the website?
I'm trying to decipher what the filters mean in the ActiveUsersXDayWidget widgets mean? Active Users 1 day - the number of active users from the end of my date range. Fine. Active Users 28 day - the number of active users from 28 days before the end of my date range, to the end of my date range. Fine. But what does a filter of 5, 10, and 15 days mean in those contexts?
2 replies
FFilament
Created by Anthaas on 10/6/2023 in #❓┊help
Customising HTML tags used by Rich Editor
Is this possible? As it stands, plain HTML tags are used with no classes, and such. I would like to be able to customise this. Is there some other editor I should be using for this?
6 replies
FFilament
Created by Anthaas on 10/4/2023 in #❓┊help
Modifying default page layout.
Hi! I've been following Filament for a while, and am using it for the first time on a small website for a family business. It's incredibly easy to use. I suspect either I'm overthinking this, or am missing something - and the answer might simply be "publish the filament-panels files and modify the index.blade.php file.". If so, please say. I am not a particular fan of the large gap on a page between the heading and the tables added. I think I've narrowed it down to the h-full class on the section element added to the page. Is there a way of removing this without needing to publish/edit the vendor views, and subsequently, is doing this change likely to result in a wonky layout that I may not have encountered yet?
59 replies