First Commit

This commit is contained in:
Pusdatin BPKD Jkt
2022-07-07 16:29:51 +07:00
commit 886e2d5002
2626 changed files with 1160844 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\User;
use App\Models\RoleUser;
use Hash;
use Illuminate\Support\Str;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
User::truncate();
$user = new User;
$user->name = "Superadmin";
$user->nrk = "superadmin";
$user->password = Hash::make('superadmin123!');
$user->save();
$user->assignRole('superadmin');
$user = new User;
$user->name = "admin";
$user->nrk = "admin";
$user->password = Hash::make('admin321!');
$user->save();
$user->assignRole('admin');
$user = new User;
$user->name = "anggaran";
$user->nrk = "anggaran";
$user->password = Hash::make('anggaran321');
$user->save();
$user->assignRole('anggaran');
$user = new User;
$user->name = "skpd";
$user->nrk = "skpd";
$user->password = Hash::make('skpd321');
$user->save();
$user->assignRole('skpd');
$user = new User;
$user->name = "bendahara";
$user->nrk = "bendahara";
$user->password = Hash::make('bendahara321');
$user->save();
$user->assignRole('bendahara');
}
}