Actualización de moelo user y relación many con asistencias, creación del modelo de asistencia y control por middleware y autenticación
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AreaCodeSeeder extends Seeder
|
||||
{
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('area_code')->insert([
|
||||
'name' => 'COR-DSIS'
|
||||
]);
|
||||
|
||||
DB::table('area_code')->insert([
|
||||
'name' => 'COR-PROG'
|
||||
]);
|
||||
|
||||
DB::table('area_code')->insert([
|
||||
'name' => 'COR-CSIS'
|
||||
]);
|
||||
|
||||
DB::table('area_code')->insert([
|
||||
'name' => 'COR-RECU'
|
||||
]);
|
||||
|
||||
DB::table('area_code')->insert([
|
||||
'name' => 'COR-COMP'
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ class DatabaseSeeder extends Seeder
|
||||
{
|
||||
$this->call(RoleSeeder::class);
|
||||
$this->call(PlantelSeeder::class);
|
||||
$this->call(AreaCodeSeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
$this->call(NivelSeeder::class);
|
||||
$this->call(DurationSeeder::class);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
@@ -103,5 +102,14 @@ class RoleSeeder extends Seeder
|
||||
Permission::create(['name'=>'concepto.create','description'=>'Crear conceptos'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'concepto.edit','description'=>'Editar conceptos'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'concepto.destroy','description'=>'Eliminar conceptos'])->syncRoles([$role1]);
|
||||
|
||||
Permission::create(['name'=>'code.index','description'=>'Ver asistencia digital'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'code.create','description'=>'Asistencia digital'])->syncRoles([$role1]);
|
||||
|
||||
Permission::create(['name'=>'asistencia.index','description'=>'Ver asistencias'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'asistencia.create','description'=>'Crear asistencias'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'asistencia.edit','description'=>'Editar asistencias'])->syncRoles([$role1]);
|
||||
Permission::create(['name'=>'asistencia.destroy','description'=>'Eliminar asistencias'])->syncRoles([$role1]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ class UserSeeder extends Seeder
|
||||
'direccion'=>'Zacatenco mz 21 lt 2 san francisco cuautliquixca',
|
||||
'telefono'=>'5636287759',
|
||||
'password' => bcrypt('6686'),
|
||||
'code'=>1,
|
||||
'status'=>1
|
||||
])->assignRole('Admin');
|
||||
|
||||
|
||||
@@ -4,13 +4,10 @@ namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
class prospectoStatusSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('prospecto_status')->insert([
|
||||
|
||||
Reference in New Issue
Block a user