update
This commit is contained in:
@@ -15,8 +15,9 @@ class UserFactory extends Factory
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name(),
|
||||
'nama' => $this->faker->name(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
't_daftar' => now(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
|
||||
@@ -15,8 +15,21 @@ class CreateUsersTable extends Migration
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('nama');
|
||||
$table->string('kodcaw')->nullable();
|
||||
$table->string('nokp')->nullable();
|
||||
$table->string('bank_acc_pembeli')->nullable();
|
||||
$table->string('bank_acc_no_pembeli')->nullable();
|
||||
$table->string('alamat_rumah')->nullable();
|
||||
$table->string('notelpejabat')->nullable();
|
||||
$table->string('notelbimbit')->nullable();
|
||||
$table->string('note')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->timestamp('t_daftar')->nullable();
|
||||
$table->integer('online')->nullable();
|
||||
$table->integer('register_agree')->nullable();
|
||||
$table->string('username')->unique();
|
||||
$table->string('email')->nullable();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
|
||||
@@ -92,49 +92,57 @@ class RolesSeeder extends Seeder
|
||||
|
||||
// create demo users
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Admin',
|
||||
'nama' => 'Admin',
|
||||
'username' => 'Admin',
|
||||
'email' => 'admin@example.com',
|
||||
]);
|
||||
$user->assignRole($role1);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Khazanah',
|
||||
'nama' => 'Khazanah',
|
||||
'username' => 'Khazanah',
|
||||
'email' => 'khazanah@example.com',
|
||||
]);
|
||||
$user->assignRole($role2);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Teller',
|
||||
'nama' => 'Teller',
|
||||
'username' => 'Teller',
|
||||
'email' => 'teller@example.com',
|
||||
]);
|
||||
$user->assignRole($role3);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Pengurus Cawangan',
|
||||
'nama' => 'Pengurus Cawangan',
|
||||
'username' => 'PC',
|
||||
'email' => 'penguruscawangan@example.com',
|
||||
]);
|
||||
$user->assignRole($role4);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Juru Lelong',
|
||||
'nama' => 'Juru Lelong',
|
||||
'username' => 'Juru Lelong',
|
||||
'email' => 'jurulelong@example.com',
|
||||
]);
|
||||
$user->assignRole($role5);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Operasi',
|
||||
'nama' => 'Operasi',
|
||||
'username' => 'Operasi',
|
||||
'email' => 'operasi@example.com',
|
||||
]);
|
||||
$user->assignRole($role6);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Account',
|
||||
'nama' => 'Account',
|
||||
'username' => 'Account',
|
||||
'email' => 'account@example.com',
|
||||
]);
|
||||
$user->assignRole($role7);
|
||||
|
||||
$user = \App\Models\User::factory()->create([
|
||||
'name' => 'Pembida',
|
||||
'nama' => 'Pembida',
|
||||
'username' => 'Pembida',
|
||||
'email' => 'pembida@example.com',
|
||||
]);
|
||||
$user->assignRole($role8);
|
||||
|
||||
Reference in New Issue
Block a user