Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LaunchPadCS/launchpad
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarv committed Feb 25, 2018
2 parents a39f7d8 + 0465a0d commit 7608e39
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/Console/Commands/HashidSalt.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

namespace App\Console\Commands;
use Illuminate\Support\Str;

use Illuminate\Console\Command;

class HashidSalt extends Command
{
/**
Expand All @@ -16,6 +18,7 @@ class HashidSalt extends Command
* @var string
*/
protected $description = 'Set the hashid salt in .env';

/**
* Execute the console command.
*
Expand All @@ -28,10 +31,12 @@ public function handle()
$this->laravel['config']['hashids.connections.main.salt'] = $key;
$this->info("JWT key [$key] set successfully.");
}

/**
* Set the application key in the environment file.
*
* @param string $key
* @param string $key
*
* @return void
*/
protected function setKeyInEnvironmentFile($key)
Expand All @@ -42,6 +47,7 @@ protected function setKeyInEnvironmentFile($key)
file_get_contents($this->laravel->environmentFilePath())
));
}

/**
* Generate a random key for the application.
*
Expand All @@ -51,4 +57,4 @@ protected function generateRandomKey()
{
return str_random(10);
}
}
}

0 comments on commit 7608e39

Please sign in to comment.