Use Locations transformer for location API

This commit is contained in:
snipe 2017-01-26 20:08:06 -08:00
parent c7003897ae
commit 377cb8e5d1

View file

@ -6,7 +6,7 @@ use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Helpers\Helper;
use App\Models\Location;
use App\Http\Transformers\DatatablesTransformer;
use App\Http\Transformers\LocationsTransformer;
class LocationsController extends Controller
{
@ -47,7 +47,7 @@ class LocationsController extends Controller
$total = $locations->count();
$locations = $locations->skip($offset)->take($limit)->get();
return (new DatatablesTransformer)->transformDatatables($locations, $total);
return (new LocationsTransformer)->transformLocations($locations, $total);
}