Open MichaelCPGordon opened 9 years ago
I'm having this exact same issue. Have spent a ton of time trying to figure it out and getting nowhere. For what it's worth, Example 008 Documentation does work on my machine. Here's the contents of my index.php:
<?php // Entry point for all API requests
require_once($_SERVER["DOCUMENT_ROOT"]."/environment/start.php");
require_once 'restler/vendor/restler.php';
use Luracast\Restler\Restler;
$restler = new Restler();
$restler->addAPIClass('ApiContact');
$restler->addAPIClass('ApiLogin');
$restler->addAPIClass('ApiRequests');
$restler->addAPIClass('ApiSubjects');
$restler->addAPIClass('Luracast\\Restler\\Resources'); // this creates resources.json at API Root
$restler->addAuthenticationClass('AccessControl');
$restler->handle(); //serve the response
I've resolved my problem with the line Luracast\Restler\Resources::$hideProtected = false;
Hi there,
I'm having trouble getting the API explorer to work correctly with my restler API's.
When I go to localhost/explorer, I get the API Explorer header bar at the top of the page and below I get text saying "fetching resource list: ../resources.json" but nothing else.
When I go to localhost/resources, the page returns the following:
So I'm guessing that it's setting up the resources.json file but doesn't seem to acknowledge that my API's exist?
Here's my index.php file:
I've also tried testing this with another restler project which had a multiple API's and I have the same issue. Anything obvious that I'm missing?