Skip to content

Commit

Permalink
Merge pull request #186 from daydevelops/master
Browse files Browse the repository at this point in the history
moved admin credentials to .env file  from seeder
  • Loading branch information
jcc authored Nov 4, 2019
2 parents 4f137ea + 2f97702 commit 163b132
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

ADMIN_NAME=
ADMIN_EMAIL=
ADMIN_PASSWORD=

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
Expand Down
5 changes: 5 additions & 0 deletions config/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
// Super Admin
'super_admin' => env('APP_SUPER_ADMIN') ?: 1,

// Admin Credentials
'admin_name' => env('ADMIN_NAME') ?: 'admin',
'admin_email' => env('ADMIN_EMAIL') ?: '[email protected]',
'admin_password' => env('ADMIN_PASSWORD') ?: 'admin',

// Default Avatar
'default_avatar' => env('DEFAULT_AVATAR') ?: '/images/default.png',

Expand Down
6 changes: 3 additions & 3 deletions database/seeds/UsersTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public function run()
{
$users = [
[
'name' => 'admin',
'email' => '[email protected]',
'password' => Hash::make('admin'),
'name' => config('blog.admin_name'),
'email' => config('blog.admin_email'),
'password' => Hash::make(config('blog.admin_password')),
'status' => true,
'is_admin' => true,
'confirm_code' => str_random(64),
Expand Down

0 comments on commit 163b132

Please sign in to comment.