Comments (3)
Then it would never use the database so just use JSON anyway.
---Sent from Boxer | http://getboxer.com
On 23 August 2016 at 01:07:20 BST, Michael Smith [email protected] wrote:Every time I deploy my app I am unable to migrate my database because artisan throws an error saying the settings table does not exist. It would be good if this automatically fell back to the JSON File Driver if the database table has not yet been created. —You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/anlutro/laravel-settings","title":"anlutro/laravel-settings","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/anlutro/laravel-settings"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[Suggestion] Fall back to JSON if table does not exist (#57)"}],"action":{"name":"View Issue","url":"https://github.com/anlutro/laravel-settings/issues/57"}}}
from laravel-settings.
I will re-phrase:
- I have my
config/settings.php
file set to use a database table - I am ready to deploy my app so I pull it from my repository and go to run
php artisan migrate
- I get an error that I cannot run
php artisan
because the tablesettings
does not exist - I then have to go and edit my
config/settings.php
file to use the JSON file driver - Run
php artisan migrate
- Now my database has the right table
settings
- I then need to go back to my
config/settings.php
to change it back to using the database driver
Now this is not an issue for already deployed apps, as they will already have the settings
table.
Although if I am wanting to deploy the app to a new server, it is a lot of hassle.
from laravel-settings.
The real issue seems to me that you're using Settings::get
before migrations are being ran - i.e. too early in your application lifecycle.
from laravel-settings.
Related Issues (20)
- Returning an array of settings. HOT 4
- Add support for deferred service provider for Laravel >=5.8
- Does it support Laravel 8? HOT 1
- Dynamic database setting HOT 4
- RTL Support HOT 1
- Laravel 9? HOT 2
- set empty array will throw Exception
- Can anlutro/l4-settings work with MongoDB ? HOT 1
- any idea if this works for Laravel 9.x? HOT 1
- Settings to not save when using DB transactions HOT 2
- Incorrect key is returned in SettingsManager->all() HOT 4
- Hidden keys
- Custom setting store doesn't use cache (or incorrect instructions) HOT 4
- Add support for NULL setting value to DatabaseSettingStore HOT 1
- Support Laravel 10 HOT 1
- bug: multiple `setExtraColumns` calls cause issues with values not being cleared HOT 4
- forgetting or deleting a setting from database is not working HOT 1
- Nested Data
- Usage with Filament Table builder HOT 1
- Creation of dynamic property anlutro\LaravelSettings\SaveMiddleware::$settings is deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-settings.