Skip to content

Commit

Permalink
Use ::class convetion.
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Dec 18, 2015
1 parent a9e8cd3 commit 38660f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Engines/BaseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Illuminate\Support\Str;
use League\Fractal\Manager;
use League\Fractal\Resource\Collection;
use League\Fractal\Serializer\DataArraySerializer;
use Yajra\Datatables\Contracts\DataTableEngineContract;
use Yajra\Datatables\Helper;
use Yajra\Datatables\Processors\DataProcessor;
Expand Down Expand Up @@ -694,7 +695,7 @@ public function render($object = false)
$fractal->parseIncludes($this->request->get('include'));
}

$serializer = $this->serializer ?: Config::get('datatables.fractal.serializer', 'League\Fractal\Serializer\DataArraySerializer');
$serializer = $this->serializer ?: Config::get('datatables.fractal.serializer', DataArraySerializer::class);
$fractal->setSerializer(new $serializer);

//Get transformer reflection
Expand Down

0 comments on commit 38660f5

Please sign in to comment.