From e618bd4b564a23d176d6aab98b05edbe50703a70 Mon Sep 17 00:00:00 2001 From: Russ Long Date: Mon, 8 Aug 2022 14:57:49 -0400 Subject: [PATCH] relation updates --- app/Models/CarShowCategory.php | 2 +- app/Models/CarShowWinner.php | 4 ++-- app/Models/Checkout.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/CarShowCategory.php b/app/Models/CarShowCategory.php index 63d9a28..1fd5904 100644 --- a/app/Models/CarShowCategory.php +++ b/app/Models/CarShowCategory.php @@ -29,6 +29,6 @@ class CarShowCategory extends Model } public function showWinner() { - return $this->hasMany('App\Models\CarShowWinner', 'id', 'category'); + return $this->hasMany(CarShowWinner::class, 'category'); } } diff --git a/app/Models/CarShowWinner.php b/app/Models/CarShowWinner.php index 5a6efb9..941c108 100644 --- a/app/Models/CarShowWinner.php +++ b/app/Models/CarShowWinner.php @@ -20,11 +20,11 @@ class CarShowWinner extends Model public function awardVehicle() { - return $this->hasMany('App\Models\Vehicles', 'id', 'vehicle'); + return $this->hasMany(Vehicles::class, 'vehicle'); } public function awardCategory() { - return $this->hasMany('App\Models\CarShowCategory', 'id', 'category'); + return $this->hasMany(CarShowCategory::class, 'category'); } } diff --git a/app/Models/Checkout.php b/app/Models/Checkout.php index 5dce4b3..f30308f 100644 --- a/app/Models/Checkout.php +++ b/app/Models/Checkout.php @@ -25,11 +25,11 @@ class Checkout extends Model public function bidders() { - return $this->belongsTo('App\Models\Bidders', 'bidder_num', 'idbidders'); + return $this->belongsTo(Bidders::class, 'idbidders'); } public function paymentMethod() { - return $this->hasMany('App\Models\PaymentMethods', 'payment_method', 'pm_id'); + return $this->hasMany(PaymentMethods::class, 'payment_method', 'pm_id'); } }