File: /var/www/admin.javaapp.co.uk/app/Models/CafeMenuItem.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CafeMenuItem extends Model
{
use HasFactory;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cafe_menu_items';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'item_name',
'cafe_id',
'cafe_menu_id',
'item_image_id',
'item_type',
'item_price',
'item_description',
'status',
'item_deleted_at',
'created_at',
'updated_at',
];
public function preDefinedImage()
{
return $this->belongsTo(PreDefinedItemImage::class, 'item_image_id');
}
}