Modificacion de prospecto a alumno y asignacion de grupos, coordinacion académica

This commit is contained in:
2026-03-23 15:48:23 -06:00
parent 58e27fc5fc
commit 1bcebeb8a1
43 changed files with 1551 additions and 96 deletions
+83
View File
@@ -0,0 +1,83 @@
<?php
namespace Database\Seeders;
use App\Models\Material;
use Illuminate\Database\Seeder;
class MaterialSeeder extends Seeder
{
public function run(): void
{
for ($f=1; $f <=6; $f++) {
for($e=1 ; $e <=8 ; $e++) {
$fakeWord = fake()->word();
$material='';
if($f==1){
$material= Material::create([
'name'=> $fakeWord,
'objetivo'=>'desarrollo de material del ciclo'.$e,
'creditos'=>10,
'ciclo'=>$f,
'horas'=>5,
'clave'=>$e.'-car',
'serial'=>'car',
'status'=>1
]);
$material->carreraMaterial()->sync([1]);
}else{
$material= Material::create([
'name'=> $fakeWord,
'objetivo'=>'desarrollo de material del ciclo'.$e,
'creditos'=>10,
'ciclo'=>$f,
'horas'=>5,
'clave'=>$e.'-car',
'serial'=>'car',
'status'=>0
]);
$material->carreraMaterial()->sync([1]);
}
}
}
for ($f=1; $f <=10; $f++) {
for($e=1 ; $e <=8 ; $e++) {
$fakeWord = fake()->word();
$material2='';
if($f==1){
$material2= Material::create([
'name'=> $fakeWord,
'objetivo'=>'desarrollo de material del ciclo'.$e,
'creditos'=>10,
'ciclo'=>$f,
'horas'=>5,
'clave'=>$e.'-car',
'serial'=>'car',
'status'=>1
]);
$material2->carreraMaterial()->sync([13]);
}else{
$material2= Material::create([
'name'=> $fakeWord,
'objetivo'=>'desarrollo de material del ciclo'.$e,
'creditos'=>10,
'ciclo'=>$f,
'horas'=>5,
'clave'=>$e.'-car',
'serial'=>'car',
'status'=>0
]);
$material2->carreraMaterial()->sync([13]);
}
}
}
}
}