<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class FoodCategories extends Model
{
    
    use HasFactory;

    protected $fillable = ['title', 'description'];
    
    public function details()
    {
        return $this->hasMany('App\Models\FoodItem', 'foodcat_id', 'id')->select(['foodcat_id', 'item as food_name', 'status as status', 'desc as description']);;
    }

}