1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-16 07:02:31 +01:00
flox/server/app/Item.php

26 lines
466 B
PHP
Raw Normal View History

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