<?php

namespace App\Models;

use GuzzleHttp\Psr7\Request;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\insert_topping;

class add_to_cart extends Model
{
    use HasFactory;

    public function insert_topping()
    {
        return $this->hasMany(insert_topping::class, 'add_to_cart_id', 'id')
            ->whereNotNull('toppings_left_name')
            ->orWhereNotNull('toppings_center_name')
            ->orWhereNotNull('toppings_right_name')
            ->orWhereNotNull('pretoppings_left_name')
            ->orWhereNotNull('pretoppings_center_name')
            ->orWhereNotNull('pretoppings_right_name');
    }
}
