Skip to content

Commit 28f358d

Browse files
[10.x] Simplify SQLite initial configuration (#9124)
* Update installation.md * Update installation.md --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 2aab9af commit 28f358d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

installation.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,7 @@ Your `.env` file should not be committed to your application's source control, s
230230

231231
Now that you have created your Laravel application, you probably want to store some data in a database. By default, your application's `.env` configuration file specifies that Laravel will be interacting with a MySQL database and will access the database at `127.0.0.1`. If you are developing on macOS and need to install MySQL, Postgres, or Redis locally, you may find it convenient to utilize [DBngin](https://dbngin.com/).
232232

233-
If you do not want to install MySQL or Postgres on your local machine, you can always use a [SQLite](https://www.sqlite.org/index.html) database. SQLite is a small, fast, self-contained database engine. To get started, create a SQLite database by creating an empty SQLite file. Typically, this file will exist within the `database` directory of your Laravel application:
234-
235-
```shell
236-
touch database/database.sqlite
237-
```
238-
239-
Next, update your `.env` configuration file to use Laravel's `sqlite` database driver. You may remove the other database configuration options:
233+
If you do not want to install MySQL or Postgres on your local machine, you can always use a [SQLite](https://www.sqlite.org/index.html) database. SQLite is a small, fast, self-contained database engine. To get started, update your `.env` configuration file to use Laravel's `sqlite` database driver. You may remove the other database configuration options:
240234

241235
```ini
242236
DB_CONNECTION=sqlite # [tl! add]
@@ -254,6 +248,8 @@ Once you have configured your SQLite database, you may run your application's [d
254248
php artisan migrate
255249
```
256250

251+
If an SQLite database does not exist for your application, Laravel will ask you if you would like the database to be created. Typically, the SQLite database file will be created at `database/database.sqlite`.
252+
257253
<a name="directory-configuration"></a>
258254
### Directory Configuration
259255

0 commit comments

Comments
 (0)