Skip to content

Commit

Permalink
seederrrrr
Browse files Browse the repository at this point in the history
  • Loading branch information
AndikaHilmiHamdani committed Mar 18, 2022
1 parent 01f23c2 commit e0fb479
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
28 changes: 28 additions & 0 deletions database/seeders/UserManajerSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class UserManajerSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$manajer= User::create([
'nama_karyawan'=>'Manajer',
'alamat'=> 'jalanin doang ga jadian',
'no_hp'=>'12344',
'email'=>'manajer@rejiku.com',
'password'=>Hash::make('12345678'),
]);
$manajer ->assignRole('manajer');
}
}
11 changes: 2 additions & 9 deletions database/seeders/UserSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@ public function run()
'no_hp'=>'12344',
'password'=>Hash::make('12345678'),
]);
$kasir ->assignRole('kasir');
$manajer= User::create([
'nama_karyawan'=>'Manajer',
'alamat'=> 'jalanin doang ga jadian',
'no_hp'=>'12344',
'email'=>'manajer@rejiku.com',
'password'=>Hash::make('12345678'),
]);
$manajer ->assignRole('manajer');
$kasir ->assignRole('kasir');

$kasir= User::create([
'nama_karyawan'=>'Kasir 2',
'alamat'=> 'jalan yok',
Expand Down

0 comments on commit e0fb479

Please sign in to comment.