I'm building inventory app, which will primary be used for managing information about tools in company and how many and which tools are available or given for use to someone.
Tools or Items, should be separated in categories, and each category should have set of properties i.e. attributes which can be defined for specific Item but not have to.
I built Eloquent models and relations between them:
class Category extends Model
{
public function items() {
return $this->hasMany(Item::class);
}
public function categoryProperties() {
return $this->hasMany(CategoryProperty::class);
}
}
class Item extends Model
{
public function category(){
return $this->belongsTo(Category::class);
}
public function itemProperties(){
$this->hasMany(ItemProperty::class);
}
}
class ItemProperty extends Model
{
public function item(){
return $this->belongsTo(Item::class);
}
public function categoryProperty(){
return $this->belongsTo(CategoryProperty::class);
}
}
class CategoryProperty extends Model
{
public function category(){
return $this->belongsTo(Category::class);
}
public function itemProperties(){
return $this->hasMany( ItemProperty::class, 'property_id');
}
}
My database tables look like this:

What is best way to retrieve data about Items from specific Category with all defined properties for them, suitable for showing in table, assuming that some Items don't have entries in ItemProperties table for some CategoryProperties of Category to which they belong?
I hope that my question is clear enough.