mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Use Locations transformer for location API
This commit is contained in:
parent
c7003897ae
commit
377cb8e5d1
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue