ClearBowl/api/app/Models/Recipe.php

26 lines
447 B
PHP
Raw Normal View History

2019-12-15 15:45:22 +01:00
<?php
namespace App;
use App\Models\Product;
use Illuminate\Database\Eloquent\Model;
class Recipe extends Model
{
protected $guarded = ['id'];
protected $with = ['steps', 'ingredients'];
protected $hidden = ['created_at', 'updated_at'];
public function steps()
{
return $this->hasMany(RecipeStep::class);
}
public function ingredients()
{
return $this->hasMany(RecipeProduct::class);
}
}