File: /var/www/javago-portal-updates/app/Models/CafeMenuItemSize.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CafeMenuItemSize extends Model
{
use HasFactory;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'cafe_menu_item_sizes';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'item_id',
'size_id',
'item_size_price',
'is_default_item_size',
'item_size_deleted_at',
'created_at',
'updated_at'
];
public function sizeName()
{
return $this->belongsTo(ItemSize::class, 'item_size_id', 'id')->select(['id', 'size_name']);
}
}