Tried loading settings 'App\Settings\GeneralSettings', and following properties were missing: #232
-
Hi, I'm trying to access GlobalSettings attributes: app(GeneralSettings::class)->minimal_app_version);
app(GeneralSettings::class)->minimal_app_version_description); but I get this error:
I declared the GeneralSettings class: class GeneralSettings extends Settings
{
public string $minimal_app_version;
public array $minimal_app_version_description;
public static function group(): string
{
return 'general';
}
} I declared the migration: return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('general.min_app_version', '1.3.0');
$this->migrator->add('general.min_app_version_description', ['fr' => 'test']);
}
}; I ran migrations without error, and the table contains data for those 2 attributes. I registered the settings class: 'settings' => [
GeneralSettings::class,
], What did I forgot? Regards, |
Beta Was this translation helpful? Give feedback.
Answered by
rubenvanassche
Aug 3, 2023
Replies: 2 comments
-
You're using |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
guillaumedc
-
Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're using
min
in the migration andminimal
in the class