for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Chuckbe\Chuckcms\Providers;
use Chuckbe\Chuckcms\Models\Template as TemplateModel;
use Illuminate\Support\ServiceProvider;
class ChuckTemplateServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
//
}
* Register the application services.
public function register()
$this->app->bind('ChuckTemplate', function () {
$template = TemplateModel::first();
if ($template == null) {
throw new Exception('Whoops! No Template Defined...');
Chuckbe\Chuckcms\Providers\Exception
Exception
\
return new \Chuckbe\Chuckcms\Chuck\Accessors\Template($template->slug);
});