Commands to help the project setup process.
By adding the following script to your composer.json
, running composer install
will automatically create your .env
file and generate a new app key if the file doesn't exist yet (this now runs after the install, because artisan doesn't work until the packages are installed).
{
"scripts": {
"post-install-cmd": [
"php -r \"if (!file_exists('./.env')) { copy('./.env.example', './.env'); exec('php artisan key:generate'); }\""
]
}
}