Skip to content

Instantly share code, notes, and snippets.

@davidmyersdev
Last active March 2, 2017 15:44
Show Gist options
  • Save davidmyersdev/b3d180d8fc2c469eba42ce470d49869d to your computer and use it in GitHub Desktop.
Save davidmyersdev/b3d180d8fc2c469eba42ce470d49869d to your computer and use it in GitHub Desktop.

Revisions

  1. David R. Myers II revised this gist Jun 13, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions LaravelHelpers.md
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,12 @@

    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 runs prior to the actual install too).
    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).

    ```json
    {
    "scripts": {
    "pre-install-cmd": [
    "post-install-cmd": [
    "php -r \"if (!file_exists('./.env')) { copy('./.env.example', './.env'); exec('php artisan key:generate'); }\""
    ]
    }
  2. David R. Myers II revised this gist Apr 28, 2016. No changes.
  3. David R. Myers II revised this gist Apr 28, 2016. 2 changed files with 19 additions and 7 deletions.
    19 changes: 19 additions & 0 deletions LaravelHelpers.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    # Laravel Helpers

    ## Project Setup

    ### Composer Commands

    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 runs prior to the actual install too).

    ```json
    {
    "scripts": {
    "pre-install-cmd": [
    "php -r \"if (!file_exists('./.env')) { copy('./.env.example', './.env'); exec('php artisan key:generate'); }\""
    ]
    }
    }
    ```
    7 changes: 0 additions & 7 deletions LaravelProjectSetup.json
    Original file line number Diff line number Diff line change
    @@ -1,7 +0,0 @@
    {
    "scripts": {
    "pre-install-cmd": [
    "php -r \"if (!file_exists('./.env')) { copy('./.env.example', './.env'); exec('php artisan key:generate'); }\""
    ]
    }
    }
  4. David R. Myers II created this gist Apr 28, 2016.
    7 changes: 7 additions & 0 deletions LaravelProjectSetup.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    {
    "scripts": {
    "pre-install-cmd": [
    "php -r \"if (!file_exists('./.env')) { copy('./.env.example', './.env'); exec('php artisan key:generate'); }\""
    ]
    }
    }