label). */ public const COURSES = [ 'starter' => 'Starter', 'main' => 'Main', 'dessert' => 'Dessert', 'drink' => 'Drink', ]; protected $fillable = [ 'pos_sale_id', 'product_id', 'station_id', 'name', 'unit_price_minor', 'quantity', 'line_total_minor', 'position', 'kitchen_state', 'source', 'notes', 'course', ]; protected function casts(): array { return [ 'unit_price_minor' => 'integer', 'quantity' => 'integer', 'line_total_minor' => 'integer', 'position' => 'integer', ]; } public function sale(): BelongsTo { return $this->belongsTo(PosSale::class, 'pos_sale_id'); } public function product(): BelongsTo { return $this->belongsTo(PosProduct::class, 'product_id'); } public function station(): BelongsTo { return $this->belongsTo(PosStation::class, 'station_id'); } public function modifiers(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(PosSaleLineModifier::class, 'pos_sale_line_id'); } }