-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathcommands.txt
44 lines (34 loc) · 1.34 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Database preparation
Before most of the development tools or processes can be started that database
needs to be set up. For this please make sure to have the propper environment
variables set, e.g. `DB_CONNACTION=sqlite` to use a SQlite database for local
development. (This has the advantage that you don't need to set up a propper
database server like MariaDB or Postgres). Then run the following commands:
```sh
php artisan migrate
php artisan db:seed
```
The fist command creates the database and all tables. The second command pre-fills
the tables with initial data.
If you want to drop all tables and start allover:
```sh
php artiasn migrate:fresh
php artisan db:seed
```
But note, that this variant doesn't create the database if it is still missing.
If you see errors like the following one, run `php artisan migrate`, instead:
```txt
Illuminate\Database\QueryException
Database file at path [/home/dennis/Sources/DHBW/HAWKI2/database/database.sqlite] does not exist.
Ensure this is an absolute path to the database. (Connection: sqlite, SQL: select name from sqlite_master
where type = 'table' and name not like 'sqlite_%' order by name)
```
# Start development server
```sh
php artisan serve
php artisan Reverb:start
php artisan queue:work
php artisan queue:work --queue=mails
php artisan queue:work --queue=message_broadcast
npm run dev
```