You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
768 B

1 year ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class UserInfo extends Model
{
use HasFactory;
protected $casts = [
'user_id' => 'integer',
'vendor_id' => 'integer',
'deliveryman_id' => 'integer',
'admin_id' => 'integer'
];
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
public function vendor()
{
return $this->belongsTo(Vendor::class, 'vendor_id');
}
public function delivery_man()
{
return $this->belongsTo(DeliveryMan::class, 'deliveryman_id');
}
public function admin()
{
return $this->belongsTo(Admin::class, 'admin_id');
}
}