'datetime:Y-m-d', 'amount' => 'float', ]; /** * @inheritdoc */ protected $with = ['recipe', 'food', 'user']; /** * Get the Recipe this entry belongs to. */ public function recipe(): BelongsTo { return $this->belongsTo(Recipe::class); } /** * Get the Food this entry belongs to. */ public function food(): BelongsTo { return $this->belongsTo(Food::class); } /** * Get the User this entry belongs to. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }