1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-16 15:12:32 +01:00
flox/server/app/Item.php
2015-07-28 19:05:15 +02: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');
}
}