/** * Run the database seeds. * * @return void */ public function run() { for ($i = 1; $i < 9; $i++) { for ($j = 1; $j < 5; $j++) { for ($l = 1; $l < 3; $l++) { Semestre::create(['anoDeEstudo' => $j, 'numeroSemestre' => $l, 'curso_id' => $i]); } } } }
public function crearSemestre(Request $request) { $semestre = Semestre::create($request->all()); return $semestre; }