HOME


Mini Shell 1.0
Login Page - Texind
png


Welcome to Texind Admin Portal! 馃憢

DIR: /home/u358511784/domains/admin.texindcolors.com/public_html/app/Models/
Upload File :
Current File : /home/u358511784/domains/admin.texindcolors.com/public_html/app/Models/Order.php
<?php

namespace App\Models;

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

class Order extends Model
{
    use HasFactory;

    protected $fillable = [
        'order_id', // Add 'order_id' to the $fillable array
        'date',
        'total_items',
        'client_id',
        'created_date'
    ];

    public function OrderItem()
    {
        return $this->hasMany(OrderItem::class);
    }

    public function getClient()
    {
        return $this->belongsTo(User::class, 'client_id');
    }
}