for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Pages\Bases;
use Closure;
use Illuminate\Support\Facades\Cache;
/**
* Class ViewComposer
*
* @package Arcanesoft\Pages\Bases
* @author ARCANEDEV <[email protected]>
*/
abstract class ViewComposer
{
/* ------------------------------------------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
* The View instance.
* @var \Illuminate\Contracts\View\View
protected $view;
* Caching time.
* @var int
protected $minutes = 5;
| Other Functions
* Cache the results.
* @param string $name
* @param \Closure $callback
* @return mixed
protected function cacheResults($name, Closure $callback)
return Cache::remember('cache::' . $name, $this->minutes, $callback);
}