outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
273 stars 97 forks source link

Attempts to get setting from database during initial migration #81

Closed jonkootje closed 2 years ago

jonkootje commented 2 years ago

I'm currently running into a problem with running my initial migrations. I'm currently creating a fresh installation of one of my projects that is using this package and when I try to run "php artisan migrate" it returns an error like this:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'production_some_project.nova_settings' doesn't exist (SQL: select * from nova_settings where nova_settings.key = terms_of_service limit 1)

Has anyone ever had this same issue?

Tarpsvo commented 2 years ago

I think you have a nova_get_setting() call in one of your bootup scripts (ie AppServiceProvider register or boot functions). Or outside of all scopes in routes or helpers files?

You can't call the settings helper too early.