Comments (5)
You are actually able to override where the sqlite database is.
For a build (or any for that matter), I would recommend putting it into the user's directory like this:
config/database.php
<?php
return [
/*
* If true, migrations commands will be available.
*/
'with-migrations' => true,
/*
* Here goes the application database connection configuration. By
* default, we use `sqlite` as a driver. Feel free to use another
* driver, be sure to check the database component documentation.
*/
'connections' => [
'default' => [
'driver' => 'sqlite',
'database' => $_SERVER['HOME'].'/.your-project/database.sqlite',
],
],
];
This will set it so your database is in the user's home directory, Ex: /home/novalis/.your-project/database.sqlite
You will need to create this file or instruct the user to create it. The reason I recommend the user's directory is whether in Linux, Mac or Windows the user's home directory will be set correctly and you won't need to worry about permissions of writing to it.
from laravel-zero.
@dimitricappelle Also noticed that you said storage as well, I have recently provided an example for this as well in #85 so you can check that out as well.
from laravel-zero.
@dimitricappelle try the @TNovalis solution and give us feedback 👍
from laravel-zero.
Referring to $_SERVER['HOME'] works for both issues.
Thanks!
from laravel-zero.
I may need to specify this on the docs...
from laravel-zero.
Related Issues (20)
- Cannot find sqlite database when upgrading HOT 3
- app:build ErrorException rename(app.phar, builds/app): the system cannot find the file specified (code 2) HOT 3
- Failing builds: "database/factories" and "database/seeders" was expected to exist HOT 1
- app:build gives the error: The system cannot find the file specified (code: 2) HOT 4
- Why is package auto-discovery is off ? HOT 4
- Site https://laravel-zero.com is down HOT 1
- website down/expired. Is this project still being worked on? HOT 1
- Website is down - domain expired? HOT 3
- laravel-zero.com is down HOT 1
- Website is not working anymore http://laravel-zero.com/ HOT 3
- Global Composer installation without commiting binary to version control?
- Using DB pagination methods inside a command throws an exception HOT 1
- On Windows, when running app:build "impossible find specified file" HOT 5
- QUEUES Call to undefined method Psr\Log\NullLogger::driver()
- Composer Warnings when installing pest-plugin-laravel HOT 3
- Can't update phpunit because of nunomaduro/collision version in the composer.json HOT 1
- console command suggestion
- DB related command appears when installing larastan HOT 1
- "bootstrap/app.php" is not a file in phar HOT 9
- Has the Logo addon been dropped? HOT 4
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-zero.