Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mouadziani authored and actions-user committed Jul 15, 2021
1 parent 4503be2 commit 632c907
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/LaravelQueryInspectorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Mouadziani\LaravelQueryInspector;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use \Illuminate\Database\Eloquent\Builder;

/**
* Service provider
Expand All @@ -17,9 +17,10 @@ class LaravelQueryInspectorServiceProvider extends BaseServiceProvider
*/
public function boot()
{
Builder::macro('toRawSql', function() {
Builder::macro('toRawSql', function () {
$builer = $this->getQuery();
return vsprintf(str_replace(array('?'), array('\'%s\''), $builer->toSql()), $builer->getBindings());

return vsprintf(str_replace(['?'], ['\'%s\''], $builer->toSql()), $builer->getBindings());
});
}

Expand All @@ -32,4 +33,4 @@ public function register()
{
//
}
}
}

0 comments on commit 632c907

Please sign in to comment.