GithubHelp home page GithubHelp logo

Comments (5)

TNovalis avatar TNovalis commented on May 22, 2024 3

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.

TNovalis avatar TNovalis commented on May 22, 2024 1

@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.

nunomaduro avatar nunomaduro commented on May 22, 2024

@dimitricappelle try the @TNovalis solution and give us feedback 👍

from laravel-zero.

dimitricappelle avatar dimitricappelle commented on May 22, 2024

Referring to $_SERVER['HOME'] works for both issues.
Thanks!

from laravel-zero.

nunomaduro avatar nunomaduro commented on May 22, 2024

I may need to specify this on the docs...

from laravel-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.