1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 22:52:32 +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;
2015-07-28 19:05:15 +02:00
public $timestamps = false;
2015-07-27 20:49:37 +02:00
protected $sluggable = [
'build_from' => 'title',
'save_to' => 'slug',
];
public function categories()
{
return $this->belongsTo('Flox\Category', 'category_id');
}
}