public function getIndex(Request $request)
 {
     $query = $request->input('q', '');
     $authors = $request->input('authors', []);
     $animalGroups = $request->input('animalGroups', []);
     $museums = $request->input('museums', []);
     $mediaTypes = $request->input('mediaTypes', []);
     return ApiResponseFactory::MakeEnvelope([['id' => 1, 'name' => 'Eusthenopteron foordi', 'thumbnailUrl' => 'http://bone-explorer.dev:3000/img/eusthenopteron_foordi.jpg', 'description' => 'blah blah blah'], ['id' => 2, 'name' => 'Iridotriton hechti', 'thumbnailUrl' => 'http://bone-explorer.dev:3000/img/iridotriton_hechti.jpg', 'description' => 'blah blah blah'], ['id' => 3, 'name' => 'Sipalocyon sp', 'thumbnailUrl' => 'http://bone-explorer.dev:3000/img/sipalocyon_sp.jpg', 'description' => 'blah blah blah'], ['id' => 4, 'name' => 'Teinolophos trusleri', 'thumbnailUrl' => 'http://bone-explorer.dev:3000/img/teinolophos_trusleri.jpg', 'description' => 'blah blah blah']], ['q' => $query]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getIndex(Request $request)
 {
     $terms = [];
     $group = false;
     $from = 0;
     $size = 25;
     foreach ($request->all() as $key => $value) {
         if ('q' === $key) {
             $terms['keyword'] = $value;
         } elseif ('group' === $key) {
             $group = true;
         } elseif ('from' === $key) {
             $from = $value;
         } elseif ('size' === $key) {
             $size = $value;
         } else {
             $terms['filter'][$key] = strtolower($value);
         }
     }
     $results = $this->search->search($terms, $from, $size, $group);
     return ApiResponseFactory::MakeEnvelope($this->parseResultsToResponse($results));
 }
 public function getIndex()
 {
     return ApiResponseFactory::MakeEnvelope(MediaType::orderBy('name', 'asc')->get()->toArray());
 }