/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $registers = [['title' => 'Panorama en 360º', 'init' => '1450', 'end' => '1480', 'prefix' => 'MAT', 'route' => 'threesixty/calavera', 'extension' => 'jpg', 'group' => 'calavera', 'order' => 1], ['title' => 'Delfin 360º', 'init' => '87', 'end' => '183', 'prefix' => 'DSC', 'route' => 'threesixty/delfin', 'extension' => 'jpg', 'group' => 'delfin', 'order' => 1]];
     DB::table('rotations')->delete();
     foreach ($registers as $key => $register) {
         $virtual_tour = \App\Rotations::create($register);
     }
 }
 public function listViews(Request $request)
 {
     $response = [];
     $id = $request->input('id');
     $type = $request->input('type');
     $position = $request->input('position');
     switch ($id) {
         case '_panorama':
             $response['virtual_tour'] = \App\VirtualTours::where('group', '=', $type)->where('order', '=', $position)->first();
             break;
         case '_threesixty':
             $response['rotation'] = \App\Rotations::where('group', '=', $type)->where('order', '=', $position)->first();
             break;
     }
     return view('app.augmented_reality.' . $id, $response);
 }