Last active
August 29, 2015 14:06
-
-
Save 0xMatt/12feaafd5101917b2924 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace LaravelCms\Theme; | |
class Theme | |
{ | |
/** | |
* Theme constructor | |
* | |
* @return void | |
* @access public | |
*/ | |
public function __construct() | |
{ | |
\View::addNamespace('theme', base_path('themes') . '/default'); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace LaravelCms\Theme; | |
class ThemeServiceProvider extends \Illuminate\Support\ServiceProvider | |
{ | |
/** | |
* Indicates if loading of the provider is deferred. | |
* | |
* @var bool | |
*/ | |
protected $defer = false; | |
/** | |
* Register the service provider. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
$this->app->bind('theme', function () | |
{ | |
return new Theme(); | |
}); | |
$this->app->singleton('theme.crumbs', function () | |
{ | |
return new Breadcrumb(); | |
}); | |
$this->app->singleton('theme.menu', function () | |
{ | |
return new Menu(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment