ajout app
This commit is contained in:
14
SNIPE-IT/app/Http/Transformers/DatatablesTransformer.php
Normal file
14
SNIPE-IT/app/Http/Transformers/DatatablesTransformer.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Transformers;
|
||||
|
||||
class DatatablesTransformer
|
||||
{
|
||||
public function transformDatatables($objects, $total = null)
|
||||
{
|
||||
(isset($total)) ? $objects_array['total'] = $total : $objects_array['total'] = count($objects);
|
||||
$objects_array['rows'] = $objects;
|
||||
|
||||
return $objects_array;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user