OwlCyberSecurity - MANAGER
Edit File: UserDiscount.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class UserDiscount extends Model { use SoftDeletes; protected $table = 'user_discount'; protected $fillable = [ 'affiliate_key_id', 'user_id', 'cart_name', 'invoice_id', 'is_pay', 'discount_price' ]; protected $dates = ['deleted_at']; public function user() { return $this->belongsTo(User::class); } public function affiliate() { return $this->belongsTo(AffiliateKey::class, 'affiliate_key_id'); } public function invoice() { return $this->belongsTo(Invoice::class, 'invoice_id'); } }