1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 22:52:32 +01:00
flox/backend/app/Item.php
2016-02-23 09:36:43 +01:00

26 lines
466 B
PHP

<?php
namespace Flox;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
class Item extends Model implements SluggableInterface
{
use SluggableTrait;
public $timestamps = false;
protected $sluggable = [
'build_from' => 'title',
'save_to' => 'slug',
];
public function categories()
{
return $this->belongsTo('Flox\Category', 'category_id');
}
}