File: //home/u435929562/domains/dev.peacockindia.in/public_html/app/Models/Backend/order.php
<?php
namespace App\Models\Backend;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class order extends Model
{
use HasFactory;
protected $fillable = [
'id',
'invoice',
'user_id',
'ip_address',
'name',
'last_name',
'email',
'phone',
'address_one',
'address_two',
'country',
'city',
'state',
'post_code',
'amount',
'status',
'payment_method',
'payment',
'note',
'created_at',
'updated_at',
];
public function country_name(){
return $this->belongsTo(country::class,'country')->withDefault();
}
public function city_name(){
return $this->belongsTo(city::class,'city')->withDefault();
}
public function state_name(){
return $this->belongsTo(state::class,'state')->withDefault();
}
}