Recipes/app/Recipe.php

23 lines
472 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Recipe extends Model
{
use HasFactory;
protected $fillable = ['name','maintainer','author','servings','date_entered','date_modified','instructions'];
2022-02-07 21:50:25 -06:00
public function user()
{
return $this->belongsTo('App\User');
}
public function ingredients()
{
return $this->hasMany('App\RecipeIngredient');
}
}