Created
January 31, 2019 22:57
-
-
Save danieltorscho/b058ee363b96684e1e7d40d6ac8c17fb to your computer and use it in GitHub Desktop.
Dynamically create a database.sqlite within composer project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"post-root-package-install": [ | |
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"", | |
"php -r \"file_exists('database/database.sqlite') || fopen('database/database.sqlite', 'w');\"" | |
], | |
"post-create-project-cmd": [ | |
"php artisan key:generate" | |
], | |
"post-install-cmd": [ | |
"Illuminate\\Foundation\\ComposerScripts::postInstall", | |
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"", | |
"php artisan optimize" | |
], | |
"post-update-cmd": [ | |
"Illuminate\\Foundation\\ComposerScripts::postUpdate", | |
"php -r \"file_exists('database/database.sqlite') || fopen('database/database.sqlite', 'w');\"", | |
"php artisan ide-helper:generate", | |
"php artisan ide-helper:meta", | |
"php artisan optimize" | |
] | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment