/home/techb158/immovalet.com/platform/packages/theme/src
NameSizeModeActions
Commands/-0755rm
Contracts/-0755rm
Events/-0755rm
Exceptions/-0755rm
Facades/-0755rm
Forms/-0755rm
Http/-0755rm
Providers/-0755rm
Services/-0755rm
Supports/-0755rm
Asset.php27070644editdlrm
AssetContainer.php168820644editdlrm
Breadcrumb.php14290644editdlrm
Manager.php10750644editdlrm
Theme.php252140644editdlrm
ThemeOption.php159600644editdlrm
Edit: /home/techb158/immovalet.com/platform/packages/theme/src/Asset.php (2707B)
[], 'serves' => [], ]; /** * Add a path to theme. * * @param string $path */ public function addPath($path) { static::$path = rtrim($path, '/') . '/'; } /** * Cooking your assets. * * @param string $name * @param Closure $callbacks * @return void */ public function cook($name, Closure $callbacks) { $this->stacks['cooks'][$name] = $callbacks; } /** * Serve asset preparing from cook. * * @param string $name * @return Asset */ public function serve($name) { $this->stacks['serves'][$name] = true; return $this; } /** * Flush all cooks. * * @return void */ public function flush() { foreach (array_keys($this->stacks['serves']) as $key) { if (array_key_exists($key, $this->stacks['cooks'])) { $callback = $this->stacks['cooks'][$key]; if ($callback instanceof Closure) { $callback($this); } } } } /** * Magic Method for calling methods on the default container. * * * // Call the "styles" method on the default container * echo Asset::styles(); * * // Call the "add" method on the default container * Asset::add('jquery', 'js/jquery.js'); * * @param string $method * @param array $parameters * @return mixed */ public function __call($method, $parameters) { return call_user_func_array([static::container(), $method], $parameters); } /** * Get an asset container instance. * * * // Get the default asset container * $container = Asset::container(); * * // Get a named asset container * $container = Asset::container('footer'); * * * @param string $container * @return AssetContainer */ public static function container($container = 'default') { if (!isset(static::$containers[$container])) { static::$containers[$container] = new AssetContainer($container); } return static::$containers[$container]; } }