From 3791eddce299cd64394c72e931cedfd960834397 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 20 Nov 2022 20:32:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/HomeController.php | 4 +- app/Http/Controllers/Api/UserController.php | 2 - app/Http/Middleware/JsonResponse.php | 4 +- .../Middleware/RedirectIfAuthenticated.php | 6 +- app/Http/Middleware/ValidateUserIfBanned.php | 4 +- app/Models/Admin.php | 8 +- app/Models/Balance.php | 21 +-- app/Models/Module.php | 7 +- app/Models/PersonalAccessToken.php | 29 ++-- app/Models/Task.php | 17 +- app/Models/User.php | 164 ++++++++++-------- app/Models/WorkOrder/Reply.php | 19 +- app/Models/WorkOrder/WorkOrder.php | 32 ++-- app/View/Components/ModuleEarning.php | 1 + 14 files changed, 171 insertions(+), 147 deletions(-) diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 35962f8..ab0b09e 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -4,13 +4,13 @@ use App\Http\Controllers\Controller; use App\Models\Module; -use Illuminate\Http\Request; class HomeController extends Controller { // - public function index() { + public function index() + { $modules = Module::paginate(10); return view('admin.index', compact('modules')); diff --git a/app/Http/Controllers/Api/UserController.php b/app/Http/Controllers/Api/UserController.php index 40181ba..3f0da9f 100644 --- a/app/Http/Controllers/Api/UserController.php +++ b/app/Http/Controllers/Api/UserController.php @@ -3,9 +3,7 @@ namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; -use App\Models\Transaction; use Illuminate\Http\Request; -use function config; class UserController extends Controller { diff --git a/app/Http/Middleware/JsonResponse.php b/app/Http/Middleware/JsonResponse.php index cd20c48..3d91c48 100644 --- a/app/Http/Middleware/JsonResponse.php +++ b/app/Http/Middleware/JsonResponse.php @@ -10,8 +10,8 @@ class JsonResponse /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next + * @param \Illuminate\Http\Request $request + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e96617b..e42eb4a 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -12,9 +12,9 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next - * @param string|null ...$guards + * @param \Illuminate\Http\Request $request + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next + * @param string|null ...$guards * * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ diff --git a/app/Http/Middleware/ValidateUserIfBanned.php b/app/Http/Middleware/ValidateUserIfBanned.php index 016c477..ffce2c2 100644 --- a/app/Http/Middleware/ValidateUserIfBanned.php +++ b/app/Http/Middleware/ValidateUserIfBanned.php @@ -10,8 +10,8 @@ class ValidateUserIfBanned /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next + * @param \Illuminate\Http\Request $request + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ diff --git a/app/Models/Admin.php b/app/Models/Admin.php index 04301bd..9823e33 100644 --- a/app/Models/Admin.php +++ b/app/Models/Admin.php @@ -8,10 +8,10 @@ /** * App\Models\Admin * - * @property int $id - * @property string $email - * @property string $password - * @property string|null $remember_token + * @property int $id + * @property string $email + * @property string $password + * @property string|null $remember_token * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Admin newModelQuery() diff --git a/app/Models/Balance.php b/app/Models/Balance.php index 2912c83..40b1588 100644 --- a/app/Models/Balance.php +++ b/app/Models/Balance.php @@ -11,17 +11,17 @@ /** * App\Models\Balance * - * @property int $id - * @property string|null $order_id - * @property string|null $trade_id - * @property string|null $payment - * @property string $amount - * @property string $remaining_amount - * @property string|null $paid_at - * @property int|null $user_id + * @property int $id + * @property string|null $order_id + * @property string|null $trade_id + * @property string|null $payment + * @property string $amount + * @property string $remaining_amount + * @property string|null $paid_at + * @property int|null $user_id * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read \App\Models\User|null $user + * @property-read \App\Models\User|null $user * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance avg($column) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance cache(array $tags = []) @@ -31,7 +31,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance isCachable() diff --git a/app/Models/Module.php b/app/Models/Module.php index fcf2034..03ccfee 100644 --- a/app/Models/Module.php +++ b/app/Models/Module.php @@ -14,8 +14,8 @@ /** * App\Models\Module * - * @property string $id - * @property string $name + * @property string $id + * @property string $name * @property string|null $api_token * @property string|null $url * @property string|null $wecom_key 企业微信机器人 key @@ -28,7 +28,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module isCachable() diff --git a/app/Models/PersonalAccessToken.php b/app/Models/PersonalAccessToken.php index 651cc44..cd20167 100644 --- a/app/Models/PersonalAccessToken.php +++ b/app/Models/PersonalAccessToken.php @@ -8,27 +8,29 @@ /** * App\Models\PersonalAccessToken * - * @property int $id - * @property string $tokenable_type - * @property int $tokenable_id - * @property string $name - * @property string $token - * @property array|null $abilities - * @property \Illuminate\Support\Carbon|null $last_used_at - * @property \Illuminate\Support\Carbon|null $expires_at - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at + * @property int $id + * @property string $tokenable_type + * @property int $tokenable_id + * @property string $name + * @property string $token + * @property array|null $abilities + * @property \Illuminate\Support\Carbon|null $last_used_at + * @property \Illuminate\Support\Carbon|null $expires_at + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at * @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $tokenable * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken avg($column) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken cache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken cachedValue(array $arguments, string $cacheKey) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken cachedValue(array $arguments, string + * $cacheKey) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken count($columns = '*') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken disableCache() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken isCachable() @@ -49,7 +51,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken whereTokenableId($value) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken whereTokenableType($value) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken whereUpdatedAt($value) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken withCacheCooldownSeconds(?int $seconds = null) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken withCacheCooldownSeconds(?int + * $seconds = null) * @mixin \Eloquent */ class PersonalAccessToken extends SanctumPersonalAccessToken diff --git a/app/Models/Task.php b/app/Models/Task.php index 4f3d110..78788ef 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -15,15 +15,15 @@ /** * App\Models\Task * - * @property string $id - * @property string $title - * @property int $progress - * @property string $status - * @property int $user_id - * @property int $host_id + * @property string $id + * @property string $title + * @property int $progress + * @property string $status + * @property int $user_id + * @property int $host_id * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read \App\Models\Host $host + * @property-read \App\Models\Host $host * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task avg($column) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task cache(array $tags = []) @@ -33,7 +33,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task isCachable() diff --git a/app/Models/User.php b/app/Models/User.php index 7ccc573..1fa9ca2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,34 +6,49 @@ use App\Exceptions\CommonException; use App\Exceptions\User\BalanceNotEnoughException; use GeneaLabs\LaravelModelCaching\Traits\Cachable; -use Illuminate\Contracts\Cache\LockTimeoutException; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Illuminate\Support\Facades\Cache; use Laravel\Sanctum\HasApiTokens; /** * App\Models\User * - * @property int $id - * @property string $name - * @property string $email - * @property \Illuminate\Support\Carbon|null $email_verified_at - * @property string|null $password - * @property float $balance - * @property \Illuminate\Support\Carbon|null $banned_at 封禁时间 - * @property string|null $banned_reason - * @property string|null $remember_token - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Host[] $hosts - * @property-read int|null $hosts_count - * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications - * @property-read int|null $notifications_count - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PersonalAccessToken[] $tokens - * @property-read int|null $tokens_count + * @property int + * $id + * @property string + * $name + * @property string + * $email + * @property \Illuminate\Support\Carbon|null + * $email_verified_at + * @property string|null + * $password + * @property float + * $balance + * @property \Illuminate\Support\Carbon|null + * $banned_at 封禁时间 + * @property string|null + * $banned_reason + * @property string|null + * $remember_token + * @property \Illuminate\Support\Carbon|null + * $created_at + * @property \Illuminate\Support\Carbon|null + * $updated_at + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Host[] + * $hosts + * @property-read int|null + * $hosts_count + * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] + * $notifications + * @property-read int|null + * $notifications_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PersonalAccessToken[] + * $tokens + * @property-read int|null + * $tokens_count * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User avg($column) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User cache(array $tags = []) @@ -44,7 +59,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User exists() * @method static \Database\Factories\UserFactory factory(...$parameters) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User isCachable() @@ -109,7 +125,7 @@ protected static function boot() // balance 四舍五入 if ($model->isDirty('balance')) { - $model->balance = round($model->balance, 2); + $model->balance = round($model->balance, 2, PHP_ROUND_HALF_DOWN); } if ($model->isDirty('banned_at')) { @@ -132,57 +148,57 @@ public function hosts(): HasMany * @throws CommonException * @throws BalanceNotEnoughException */ - public function toDrops($amount = 1) - { - - $cache_key = 'user_drops_' . $this->id; - - if ($amount === 0 || $amount === null) { - return $this; - } - - $rate = config('drops.rate'); - - - $transactions = new Transaction(); - - $drops = $transactions->getDrops($this->id); - - $total = 0; - - if ($drops < 0) { - $amount += abs($drops) / $rate; - } - - $total += $amount * $rate; - - - // amount 保留两位小数 - $amount = round($amount, 2); - - $lock = Cache::lock("lock_" . $cache_key, 5); - try { - $lock->block(5); - - $this->balance -= $amount; - $this->save(); - - $transactions->increaseDrops($this->id, $total); - - // $transactions - - $transactions->addPayoutBalance($this->id, $amount, '自动转换为 Drops'); - - // if user balance <= 0 - if ($this->balance < $amount) { - throw new BalanceNotEnoughException('余额不足'); - } - } catch (LockTimeoutException) { - throw new CommonException('暂时无法处理此请求,请稍后再试。'); - } finally { - optional($lock)->release(); - } - - return $this; - } + // public function toDrops($amount = 1) + // { + // + // $cache_key = 'user_drops_' . $this->id; + // + // if ($amount === 0 || $amount === null) { + // return $this; + // } + // + // $rate = config('drops.rate'); + // + // + // $transactions = new Transaction(); + // + // $drops = $transactions->getDrops($this->id); + // + // $total = 0; + // + // if ($drops < 0) { + // $amount += abs($drops) / $rate; + // } + // + // $total += $amount * $rate; + // + // + // // amount 保留两位小数 + // $amount = round($amount, 2); + // + // $lock = Cache::lock("lock_" . $cache_key, 5); + // try { + // $lock->block(5); + // + // $this->balance -= $amount; + // $this->save(); + // + // $transactions->increaseDrops($this->id, $total); + // + // // $transactions + // + // $transactions->addPayoutBalance($this->id, $amount, '自动转换为 Drops'); + // + // // if user balance <= 0 + // if ($this->balance < $amount) { + // throw new BalanceNotEnoughException('余额不足'); + // } + // } catch (LockTimeoutException) { + // throw new CommonException('暂时无法处理此请求,请稍后再试。'); + // } finally { + // optional($lock)->release(); + // } + // + // return $this; + // } } diff --git a/app/Models/WorkOrder/Reply.php b/app/Models/WorkOrder/Reply.php index fb10341..8797578 100644 --- a/app/Models/WorkOrder/Reply.php +++ b/app/Models/WorkOrder/Reply.php @@ -12,14 +12,14 @@ /** * App\Models\WorkOrder\Reply * - * @property int $id - * @property string $content - * @property int $work_order_id - * @property int|null $user_id - * @property int $is_pending - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read User|null $user + * @property int $id + * @property string $content + * @property int $work_order_id + * @property int|null $user_id + * @property int $is_pending + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read User|null $user * @property-read \App\Models\WorkOrder\WorkOrder $workOrder * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply avg($column) @@ -30,7 +30,8 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply isCachable() diff --git a/app/Models/WorkOrder/WorkOrder.php b/app/Models/WorkOrder/WorkOrder.php index 3330814..1087fab 100644 --- a/app/Models/WorkOrder/WorkOrder.php +++ b/app/Models/WorkOrder/WorkOrder.php @@ -14,30 +14,32 @@ /** * App\Models\WorkOrder\WorkOrder * - * @property int $id - * @property string $title - * @property string $content - * @property int $user_id - * @property string $module_id - * @property int|null $host_id - * @property string $status - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read Host|null $host - * @property-read Module $module + * @property int $id + * @property string $title + * @property string $content + * @property int $user_id + * @property string $module_id + * @property int|null $host_id + * @property string $status + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read Host|null $host + * @property-read Module $module * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\WorkOrder\Reply[] $replies - * @property-read int|null $replies_count - * @property-read User $user + * @property-read int|null $replies_count + * @property-read User $user * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder all($columns = []) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder avg($column) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder cache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder cachedValue(array $arguments, string $cacheKey) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder cachedValue(array $arguments, string + * $cacheKey) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder count($columns = '*') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder disableCache() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder disableModelCaching() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder exists() * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) + * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder + * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder inRandomOrder($seed = '') * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder insert(array $values) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder isCachable() diff --git a/app/View/Components/ModuleEarning.php b/app/View/Components/ModuleEarning.php index e4fff27..75d0421 100644 --- a/app/View/Components/ModuleEarning.php +++ b/app/View/Components/ModuleEarning.php @@ -8,6 +8,7 @@ class ModuleEarning extends Component { private Module $module; + /** * Create a new component instance. *