|
|
@ -19,25 +19,22 @@ return new class extends Migration |
|
|
|
$table->timestamp('email_verified_at')->nullable(); |
|
|
|
$table->string('apellido')->nullable(); |
|
|
|
$table->unsignedBigInteger('puesto_id')->nullable(); |
|
|
|
|
|
|
|
$table->unsignedBigInteger('departamento_id')->nullable(); |
|
|
|
|
|
|
|
$table->unsignedBigInteger('tipos_id')->nullable(); |
|
|
|
$table->string('telefono')->nullable(); |
|
|
|
$table->string('password'); |
|
|
|
$table->string('rol')->default('profesor'); |
|
|
|
$table->rememberToken(); |
|
|
|
$table->timestamps(); |
|
|
|
$table->foreign('puesto_id')->references('id')->on('puestos'); |
|
|
|
|
|
|
|
$table->foreign('departamento_id')->references('id')->on('despartamentos'); |
|
|
|
|
|
|
|
$table->foreign('tipos_id')->references('id')->on('tipos'); |
|
|
|
}); |
|
|
|
DB::table('users')->insert([ |
|
|
|
[ |
|
|
|
'name'=> 'Administrador', |
|
|
|
'email'=> 'admin@admin.com', |
|
|
|
'password'=> bcrypt('12345678'), |
|
|
|
'rol' => 'admin' |
|
|
|
'tipos_id' => 1 |
|
|
|
], |
|
|
|
[ |
|
|
|
'name' => 'silva', |
|
|
@ -46,8 +43,8 @@ return new class extends Migration |
|
|
|
'puesto_id' => 2, |
|
|
|
'departamento_id' => 2, |
|
|
|
'telefono' => '33652147821', |
|
|
|
'password' => bcrypt('12345678') |
|
|
|
|
|
|
|
'password' => bcrypt('12345678'), |
|
|
|
'tipos_id' => 2 |
|
|
|
], |
|
|
|
[ |
|
|
|
'name' => 'monse', |
|
|
@ -57,7 +54,7 @@ return new class extends Migration |
|
|
|
'departamento_id' => 3, |
|
|
|
'telefono' => null, |
|
|
|
'password' => bcrypt('12345678'), |
|
|
|
|
|
|
|
'tipos_id' => 1 |
|
|
|
], |
|
|
|
[ |
|
|
|
'name' => 'usuario_tipo3', |
|
|
@ -67,7 +64,7 @@ return new class extends Migration |
|
|
|
'departamento_id' => 1, |
|
|
|
'telefono' => '3333333333', |
|
|
|
'password' => bcrypt('12345678'), |
|
|
|
|
|
|
|
'tipos_id' => 3 |
|
|
|
], |
|
|
|
[ |
|
|
|
'name' => 'usuario_tipo4', |
|
|
@ -77,7 +74,7 @@ return new class extends Migration |
|
|
|
'departamento_id' => 1, |
|
|
|
'telefono' => '4444444444', |
|
|
|
'password' => bcrypt('12345678'), |
|
|
|
|
|
|
|
'tipos_id' => 4 |
|
|
|
], |
|
|
|
]); |
|
|
|
} |
|
|
|