Edit Item DB structure

This commit is contained in:
Mathieu Lagace
2019-08-27 13:36:55 -04:00
parent 615752d61a
commit 509a135e74
6 changed files with 146 additions and 2 deletions

View File

@@ -18,8 +18,17 @@ class Item extends Model
return $col_items;
}
protected $casts = [
'metadata' => 'array',
];
public function bookings()
{
return $this->hasMany('App\Booking');
}
public function category()
{
return \App\ItemCategory::find($this->category_id);
}
}