改进 返回类型
This commit is contained in:
parent
3f2d8599a8
commit
0139531973
@ -5,6 +5,7 @@
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use App\Exceptions\User\BalanceNotEnoughException;
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use GeneaLabs\LaravelModelCaching\CachedBuilder;
|
||||
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
@ -143,7 +144,7 @@ public function user_group(): BelongsTo
|
||||
return $this->belongsTo(UserGroup::class);
|
||||
}
|
||||
|
||||
public function scopeBirthday(): User
|
||||
public function scopeBirthday(): User|CachedBuilder
|
||||
{
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
return $this->select(['id', 'name', 'birthday_at', 'email_md5', 'created_at'])->whereMonth('birthday_at', now()->month)
|
||||
|
Loading…
Reference in New Issue
Block a user