use Backpack\CRUD\CrudTrait;
use Cubist\Backpack\app\Magic\Fields\Field;
use Cubist\Backpack\app\Magic\Util;
+use Cviebrock\EloquentSluggable\Sluggable;
+use Cviebrock\EloquentSluggable\SluggableScopeHelpers;
use Illuminate\Database\Eloquent\Model;
use Cubist\Backpack\app\Magic\CubistMagicAttribute;
use Illuminate\Support\Str;
use CubistMagicAttribute;
use CrudTrait;
+ use Sluggable, SluggableScopeHelpers;
/**
* @var Field[]
$this->fill($attributes);
}
+ /**
+ * Return the sluggable configuration array for this model.
+ *
+ * @return array
+ */
+ public function sluggable()
+ {
+ return [
+ 'slug' => [
+ 'source' => 'slug_or_name_or_title',
+ ],
+ ];
+ }
+
public function getOption($key, $default = null)
{
if (isset($this->_options[$key])) {