<?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);
	}
}
?>
