Erster Upload
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Spice extends Model
|
||||
{
|
||||
protected $fillable = ['name', 'quantity', 'unit'];
|
||||
|
||||
public function recipes()
|
||||
{
|
||||
return $this->belongsToMany(Recipe::class, 'recipes_spices')
|
||||
->withPivot('amount_in_percent')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user