openstamanager/app/Http/Middleware/HTMLBuilder.php

26 lines
462 B
PHP
Raw Normal View History

<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class HTMLBuilder
{
/**
* Handle an incoming request.
*
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
$response = $next($request);
$html_template = $response->content();
$content = translateTemplate($html_template);
$response->setContent($content);
return $response;
}
}