-
-
Notifications
You must be signed in to change notification settings - Fork 999
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c84da5
commit 35851ca
Showing
11 changed files
with
31 additions
and
19 deletions.
There are no files selected for viewing
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
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
2 changes: 1 addition & 1 deletion
2
database/seeds/BlockedItemsTableSeeder.php → database/seeders/BlockedItemsTableSeeder.php
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
2 changes: 1 addition & 1 deletion
2
database/seeds/BlockedTypeTableSeeder.php → database/seeders/BlockedTypeTableSeeder.php
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
2 changes: 2 additions & 0 deletions
2
...base/seeds/ConnectRelationshipsSeeder.php → ...se/seeders/ConnectRelationshipsSeeder.php
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
2 changes: 2 additions & 0 deletions
2
database/seeds/DatabaseSeeder.php → database/seeders/DatabaseSeeder.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Seeder; | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
database/seeds/PermissionsTableSeeder.php → database/seeders/PermissionsTableSeeder.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Seeder; | ||
|
||
class PermissionsTableSeeder extends Seeder | ||
|
2 changes: 2 additions & 0 deletions
2
database/seeds/RolesTableSeeder.php → database/seeders/RolesTableSeeder.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Seeder; | ||
|
||
class RolesTableSeeder extends Seeder | ||
|
2 changes: 2 additions & 0 deletions
2
database/seeds/ThemesTableSeeder.php → database/seeders/ThemesTableSeeder.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use App\Models\Theme; | ||
use Illuminate\Database\Seeder; | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use App\Models\Profile; | ||
use App\Models\User; | ||
use Illuminate\Database\Seeder; | ||
use Illuminate\Support\Facades\Hash; | ||
use jeremykenedy\LaravelRoles\Models\Role; | ||
|
||
class UsersTableSeeder extends Seeder | ||
|
@@ -14,7 +17,6 @@ class UsersTableSeeder extends Seeder | |
*/ | ||
public function run() | ||
{ | ||
$faker = Faker\Factory::create(); | ||
$profile = new Profile(); | ||
$adminRole = Role::whereName('Admin')->first(); | ||
$userRole = Role::whereName('User')->first(); | ||
|
@@ -24,15 +26,15 @@ public function run() | |
$user = User::where('email', '=', $seededAdminEmail)->first(); | ||
if ($user === null) { | ||
$user = User::create([ | ||
'name' => $faker->userName, | ||
'first_name' => $faker->firstName, | ||
'last_name' => $faker->lastName, | ||
'name' => 'Admin', | ||
'first_name' => 'Harry', | ||
'last_name' => 'Potter', | ||
'email' => $seededAdminEmail, | ||
'password' => Hash::make('password'), | ||
'token' => str_random(64), | ||
'activated' => true, | ||
'signup_confirmation_ip_address' => $faker->ipv4, | ||
'admin_ip_address' => $faker->ipv4, | ||
'signup_confirmation_ip_address' => '127.0.0.1', | ||
'admin_ip_address' => '127.0.0.1', | ||
]); | ||
|
||
$user->profile()->save($profile); | ||
|
@@ -44,15 +46,15 @@ public function run() | |
$user = User::where('email', '=', '[email protected]')->first(); | ||
if ($user === null) { | ||
$user = User::create([ | ||
'name' => $faker->userName, | ||
'first_name' => $faker->firstName, | ||
'last_name' => $faker->lastName, | ||
'name' => 'User', | ||
'first_name' => 'Hermione', | ||
'last_name' => 'Granger', | ||
'email' => '[email protected]', | ||
'password' => Hash::make('password'), | ||
'token' => str_random(64), | ||
'activated' => true, | ||
'signup_ip_address' => $faker->ipv4, | ||
'signup_confirmation_ip_address' => $faker->ipv4, | ||
'signup_ip_address' => '127.0.0.1', | ||
'signup_confirmation_ip_address' => '127.0.0.1', | ||
]); | ||
|
||
$user->profile()->save(new Profile()); | ||
|
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