DateTime Error when using 'Spatie Settings' plugin

I'm getting this error when I try to edit the settings for my site Object of class DateTime could not be converted to string ManageCompetitions.php page ``` Forms\Components\TextInput::make('name') ->required(), Forms\Components\ColorPicker::make('color') ->required() ->label('Competition Color'), Forms\Components\DateTimePicker::make('start_date') ->required() ->label('Competition Start'), Forms\Components\DateTimePicker::make('end_date') ->required() ->label('Competition End'), ``` CompetitionSettings.php` page
<?php

namespace App\Settings;

use DateTime;
use Spatie\LaravelSettings\Settings;
use Spatie\LaravelSettings\SettingsCasts\DateTimeInterfaceCast;

class CompetitionSettings extends Settings
{
    public string $name;
    public DateTime $start_date;
    public DateTime $end_date;
    public string $color;
    public string $image;
    public ?string $scoreboard;
    public bool $has_aws_creds;
    public bool $has_bifrost;

    public static function group(): string
    {
        return 'competition';
    }

    public static function casts(): array
    {
        return [
            'start_date' => DateTimeInterfaceCast::class,
            'end_date' => DateTimeInterfaceCast::class,
        ];
    }
}
Was this page helpful?