-
Notifications
You must be signed in to change notification settings - Fork 70
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
bc1cf2c
commit 5f42c70
Showing
5 changed files
with
32 additions
and
25 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
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
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 |
---|---|---|
|
@@ -7,18 +7,21 @@ | |
use Maklad\Permission\Models\Permission; | ||
use Maklad\Permission\Models\Role; | ||
|
||
class TestSeeder extends Seeder { | ||
class TestSeeder extends Seeder | ||
{ | ||
|
||
private Application $app; | ||
|
||
public function __construct(Application $app) { | ||
public function __construct(Application $app) | ||
{ | ||
$this->app = $app; | ||
} | ||
|
||
/** | ||
* Run the database seeds. | ||
*/ | ||
public function run() { | ||
public function run() | ||
{ | ||
User::create(['email' => '[email protected]']); | ||
Admin::create(['email' => '[email protected]']); | ||
$this->app[Role::class]->create(['name' => 'testRole']); | ||
|
@@ -29,5 +32,4 @@ public function run() { | |
$this->app[Permission::class]->create(['name' => 'edit-categories']); | ||
$this->app[Permission::class]->create(['name' => 'admin-permission', 'guard_name' => 'admin']); | ||
} | ||
|
||
} |