title: Remove key data in dingo - fractal
body: <p>I already looked into several example on how to remove the key "data" in response, but i cannot fix it. </p>
  
  <p>I tried to use the callback provided by dingo</p>
  
  <pre><code>return $this-&gt;collection($users, new UserTransformer, function ($resource, $fractal) {
      $fractal-&gt;setSerializer(new ArraySerializer);
  });
  </code></pre>
  
  <p>In change the "$fractal->setSerializer(new CustomSerializer);" to "$fractal->setSerializer(new ArraySerializer);" since I dont have CustomSerializer(And how to make this custom serializer?) based on the fractal documentation <a href="http://fractal.thephpleague.com/serializers/" rel="nofollow">array serializer</a> but the out put has the key "data".</p>
  
  <p>I also tested the fractal library in different project and implementing the ArraySerializer as the Serializer, and it works.</p>
  
  <p>What am I missing in the setup of dingo-fractal?</p>
  
  <p><strong>UPDATE*</strong>
  I included the setup in the <a href="https://joshhornby.co.uk/blog/laravel-dingo-json-api-spec" rel="nofollow">config</a> </p>
  
  <pre><code>$this-&gt;app-&gt;bind('Dingo\Api\Transformer\Adapter\Fractal', function($app) {
          $fractal = $app-&gt;make('\League\Fractal\Manager');
          $serializer = new \League\Fractal\Serializer\ArraySerializer();
  
          $fractal-&gt;setSerializer($serializer);
          return new \Dingo\Api\Transformer\Adapter\Fractal($fractal);
      });
  </code></pre>
  
  <p>And in my controller</p>
  
  <pre><code>    $obj = \App\EloquentModel\User::find(1);
      return $this-&gt;response-&gt;item($obj, new UserTransformer);
  </code></pre>
  
  <p>And in my UserTransformer</p>
  
  <pre><code>public function transform(User $trans)
  {
      return [
          'id'            =&gt; (int) $trans-&gt;id,
          'name'          =&gt; $trans-&gt;name,
          'description'   =&gt; $trans-&gt;description
      ];
  }
  </code></pre>
  
  <p>Applying those things removed the key "data" for single item.</p>
  
  <pre><code>{
     "id": 1,
     "name": "Juan",
     "description": "The BOss"
  }
  </code></pre>
  
  <p>But when I try to make it an Array. User::all(), the response has the "data" key.</p>
  
  <p>Thanks.</p>