{
parent::setup();
- $this->crud->setModel("Cubist\Backpack\app\Models\Setting");
- $this->crud->setEntityNameStrings(trans('backpack::settings.setting_singular'), trans('backpack::settings.setting_plural'));
- $this->crud->setRoute(backpack_url('setting'));
+ $this->crud->setModel("Cubist\Backpack\app\Models\Template");
+ $this->crud->setEntityNameStrings(trans('cubist_back::templates.template_singular'), trans('cubist_back::templates.template_plural'));
+ $this->crud->setRoute(backpack_url('template'));
$this->crud->addClause('where', 'active', 1);
$this->crud->denyAccess(['create', 'delete']);
$this->crud->setColumns([
[
'name' => 'name',
- 'label' => trans('backpack::settings.name'),
- ],
- [
- 'name' => 'value',
- 'label' => trans('backpack::settings.value'),
+ 'label' => trans('cubist_back::templates.name'),
],
[
'name' => 'description',
- 'label' => trans('backpack::settings.description'),
+ 'label' => trans('cubist_back::templates.description'),
],
]);
$this->crud->addField([
'name' => 'name',
- 'label' => trans('backpack::settings.name'),
+ 'label' => trans('cubist_back::templates.name'),
'type' => 'text',
- 'attributes' => [
- 'disabled' => 'disabled',
- ],
]);
}
<?php
-namespace Backpack\Settings\app\Models;
+namespace Cubist\Backpack\app\Models;
use Backpack\CRUD\CrudTrait;
use Config;
use CrudTrait;
protected $table = 'cubist_templates';
- protected $fillable = ['value'];
+ protected $fillable = ['name','description','parent',''];
/**
* Grab a setting value from the database.
*/
public static function set($key, $value = null)
{
- $prefixed_key = 'settings.'.$key;
+ $prefixed_key = 'template.'.$key;
$setting = new self();
$entry = $setting->where('key', $key)->firstOrFail();