mirror of
https://github.com/brian8544/turtle-wow.git
synced 2024-12-29 02:44:34 +00:00
30 lines
656 B
PHP
30 lines
656 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use TCG\Voyager\Models\Role;
|
|
|
|
class RolesTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Auto generated seed file.
|
|
*/
|
|
public function run()
|
|
{
|
|
$role = Role::firstOrNew(['name' => 'admin']);
|
|
if (!$role->exists) {
|
|
$role->fill([
|
|
'display_name' => __('voyager::seeders.roles.admin'),
|
|
])->save();
|
|
}
|
|
|
|
$role = Role::firstOrNew(['name' => 'user']);
|
|
if (!$role->exists) {
|
|
$role->fill([
|
|
'display_name' => __('voyager::seeders.roles.user'),
|
|
])->save();
|
|
}
|
|
}
|
|
}
|