示例#1
0
 public function create($id, Prova $prova, Questao $questao)
 {
     $provas = $prova->find($id);
     $questoes = DB::table('questaos')->where('prova_id', $id)->get();
     $alternativa = DB::table('alternativas')->where('prova_id', $id)->get();
     return view('provas.questoes.create', compact('provas', 'questoes', 'alternativa'));
 }
示例#2
0
 public function run()
 {
     $faker = Faker::create();
     DB::table('provas')->truncate();
     foreach (range(1, 20) as $i) {
         Prova::create(['banca_id' => $faker->numberBetween(1, 10), 'cargo_id' => $faker->numberBetween(1, 8), 'orgao_id' => $faker->numberBetween(1, 8), 'nivel_id' => $faker->numberBetween(1, 3), 'ano_id' => $faker->numberBetween(1, 8)]);
     }
 }