@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace App\Port\Provider\Traits; |
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | -use DB; |
|
| 7 | -use Log; |
|
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * Class AutoRegisterServiceProvidersTrait. |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function debugDatabaseQueries($log = true, $terminal = false) |
| 29 | 29 | { |
| 30 | 30 | if (Config::get('database.query_debugging')) { |
| 31 | - DB::listen(function ($event) use ($terminal, $log) { |
|
| 31 | + DB::listen(function($event) use ($terminal, $log) { |
|
| 32 | 32 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
| 33 | 33 | |
| 34 | 34 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
| 53 | 53 | { |
| 54 | - App::singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
| 54 | + App::singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
| 55 | 55 | $faker = $app->make(\Faker\Generator::class); |
| 56 | 56 | |
| 57 | 57 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
| 103 | 103 | if ($serializerName !== 'DataArray') { |
| 104 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
| 104 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
| 105 | 105 | switch ($serializerName) { |
| 106 | 106 | case 'JsonApi': |
| 107 | 107 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |