One option:
You can define your own ViewServiceProvider which extends the Laravel one. You would then need to override the registerBladeEngine method - this is where the Blade Compiler is bound into the container:
public function registerBladeEngine($resolver)
{
$this->app->singleton('blade.compiler', function () {
return new MyBladeCompiler(
$this->app['files'], $this->app['config']['view.compiled']
);
});
$resolver->register('blade', function () {
return new CompilerEngine($this->app['blade.compiler']);
});
}
MyBladeCompiler extends the Laravel BladeCompiler and overrides the compile method with your implementation.
Finally, swap the Illuminate\View\ViewServiceProvider::class out of the config/app.php providers array, and replace it with your own ViewServiceProvider.