config
This commit is contained in:
27
app_old/aldarien/view/app/Service/View.php
Normal file
27
app_old/aldarien/view/app/Service/View.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user