Files
oficial/aldarien/view/app/Service/View.php
Juan Pablo Vial b212381bb7 Cli
2023-06-22 23:15:17 -04:00

28 lines
518 B
PHP

<?php
namespace App\Service;
use eftec\bladeone\BladeOne;
class View
{
protected $views;
protected $cache;
protected $blade;
public function __construct(array $variables = [])
{
$this->views = config('locations.views');
$this->cache = config('locations.cache');
$this->blade = new BladeOne($this->views, $this->cache, null, $variables);
}
public function show($template, $vars = null)
{
if ($vars) {
return $this->blade->run($template, $vars);
}
return $this->blade->run($template);
}
}
?>