/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('matchmaker_answers')->delete();
     MatchmakerAnswer::create(['id' => 1, 'category_id' => 1, 'order_num' => 1, 'question' => 'Are you a Power player, Control Player, or Balanced Player?']);
     MatchmakerQuestion::create(['id' => 2, 'category_id' => 1, 'order_num' => 2, 'question' => 'Do you prefer to Shoot or Retrieve the ball?']);
     MatchmakerQuestion::create(['id' => 3, 'category_id' => 1, 'order_num' => 3, 'question' => 'Do you prefer to Shoot or Retrieve the ball?']);
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $answers = MatchmakerAnswer::get();
     $answers_list = array();
     foreach ($answers as $a) {
         $answers_list[$a->id] = $a;
     }
     return response()->json($answers_list);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('matchmaker_answers')->delete();
     MatchmakerAnswer::create(['id' => 1, 'question_id' => 1, 'order_num' => 1, 'answer' => 'Power Player', 'value' => 1]);
     MatchmakerAnswer::create(['id' => 2, 'question_id' => 1, 'order_num' => 2, 'answer' => 'Balanced Player', 'value' => 2]);
     MatchmakerAnswer::create(['id' => 3, 'question_id' => 1, 'order_num' => 3, 'answer' => 'Control Player', 'value' => 3]);
     MatchmakerAnswer::create(['id' => 4, 'question_id' => 2, 'order_num' => 1, 'answer' => 'Shoot', 'value' => 4]);
     MatchmakerAnswer::create(['id' => 5, 'question_id' => 2, 'order_num' => 2, 'answer' => 'Retrieve', 'value' => 5]);
     MatchmakerAnswer::create(['id' => 6, 'question_id' => 3, 'order_num' => 1, 'answer' => 'Level-headed', 'value' => 6]);
     MatchmakerAnswer::create(['id' => 7, 'question_id' => 3, 'order_num' => 2, 'answer' => 'Emotionally', 'value' => 7]);
 }