php - Fractal API call does not return content -
i worte api methods fractal package output content. when call specific resources, returns empty. to check if working performed prints of content variables inbetween. example, if take $incidents variable in index function returned entries in database expected. the same true, when call $collection variable in respondwithcollection method in api controller. data available here well. browser output this: { "data": { "headers": {} } } to keep simple, method show results of database: class apiincidentscontroller extends apicontroller { protected $incidenttransformer; protected $fractal; function __construct(incidenttransformer $incidenttransformer){ $this->incidenttransformer = $incidenttransformer; $this->beforefilter('auth.basic', ['on' => 'post']); $this->fractal = new manager(); parent::__construct($this->fractal); } public function index() { $inci...