/**
  * Shows an endpoint's details
  *
  * @return Response
  */
 public function getEndpoint($alias)
 {
     $endpoint = Endpoint::findByAlias($alias)->first();
     if ($endpoint === null) {
         throw new NotFoundHttpException();
     }
     $baseURL = Setting::byKey('base_api_url');
     $requestParameterTypes = RequestParameterType::all();
     $requestParameters = [];
     foreach ($requestParameterTypes as $requestParameterType) {
         $rp = $endpoint->requestParameters()->where('request_parameter_type_id', '=', $requestParameterType->id)->get();
         $requestParameters[$requestParameterType->id] = ['type' => $requestParameterType, 'parameters' => $rp];
     }
     $data = ['endpoint' => $endpoint, 'requestParameters' => $requestParameters, 'baseURL' => $baseURL];
     return view('layouts.frontend.endpoint', $data);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $resources = Setting::all();
     return $this->response->withCollection($resources, new SettingTransformer());
 }