diff --git a/app/Jobs/HostCost.php b/app/Jobs/HostCost.php index bea86ba..d56c364 100644 --- a/app/Jobs/HostCost.php +++ b/app/Jobs/HostCost.php @@ -4,13 +4,10 @@ use App\Helpers\Lock; use App\Models\Host; -use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; - use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Facades\Cache; class HostCost implements ShouldQueue { diff --git a/app/Models/Host.php b/app/Models/Host.php index c03d1ca..6c37b82 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -77,23 +77,17 @@ public function scopeThisUser($query, $module = null) // cost public function cost($price = null) { - $price = abs($price); - $this->load('user'); $cache_key = 'user_drops_' . $this->user_id; $drops = Cache::get($cache_key); - // Log::debug($user); if ($price !== null) { - $this->managed_price = $price; + $this->price = $price; } - if ($this->managed_price) { - $this->price = $this->managed_price; - } $amount = $price / Cache::get('drops_rate', 100) + 1;