adrema/app/Tex/TexServiceProvider.php

33 lines
601 B
PHP
Raw Normal View History

2021-07-17 15:25:39 +02:00
<?php
namespace App\Tex;
use Illuminate\Support\ServiceProvider;
use Illuminate\View\Engines\CompilerEngine;
class TexServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
2022-03-11 20:19:17 +01:00
view()->addExtension('tex', 'tex', function () {
2021-07-17 15:25:39 +02:00
$compiler = new TexCompiler(app('files'), config('view.compiled'));
return new CompilerEngine($compiler, app('files'));
});
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
}
}