Viewing file: MealPlanDetailsTask.php (957 B) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model;
class MealPlanDetailsTask extends Model { use HasFactory;
public function task_breakfast(){ return $this->belongsTo(MealPlanTask::class, 'breakfast', 'id')->withDefault(); } public function task_launch(){ return $this->belongsTo(MealPlanTask::class, 'launch', 'id')->withDefault(); } public function task_snack(){ return $this->belongsTo(MealPlanTask::class, 'snack', 'id')->withDefault(); } public function task_dinner(){ return $this->belongsTo(MealPlanTask::class, 'snack', 'id')->withDefault(); } public function task_dinner_snack(){ return $this->belongsTo(MealPlanTask::class, 'dinner_snack', 'id')->withDefault(); } public function task(){ return $this->belongsTo(MealPlanTask::class, 'task_id', 'id')->withDefault(); } }
|