Files
oficial/aldarien/view/app/Service/View.php

28 lines
479 B
PHP
Raw Normal View History

2021-03-25 21:23:29 -03:00
<?php
namespace App\Service;
2023-02-10 15:12:30 +00:00
use eftec\bladeone\BladeOne;
2021-03-25 21:23:29 -03:00
class View
{
protected $views;
protected $cache;
protected $blade;
public function __construct()
{
$this->views = config('locations.views');
$this->cache = config('locations.cache');
2023-02-10 15:12:30 +00:00
$this->blade = new BladeOne($this->views, $this->cache);
2021-03-25 21:23:29 -03:00
}
public function show($template, $vars = null)
{
if ($vars) {
2023-02-10 15:12:30 +00:00
return $this->blade->run($template, $vars);
2021-03-25 21:23:29 -03:00
}
2023-02-10 15:12:30 +00:00
return $this->blade->run($template);
2021-03-25 21:23:29 -03:00
}
}
?>