mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-05-15 04:27:34 +08:00
DBPdo instead of DBMysqli
This commit is contained in:
@@ -15,7 +15,10 @@ class NexusModel extends Model
|
||||
|
||||
protected $perPage = 50;
|
||||
|
||||
protected $connection = NexusDB::ELOQUENT_CONNECTION_NAME;
|
||||
public function getConnectionName()
|
||||
{
|
||||
return NexusDB::getConnectionName();
|
||||
}
|
||||
|
||||
protected function usernameForAdmin(): Attribute
|
||||
{
|
||||
|
||||
+5
-2
@@ -31,8 +31,6 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
protected $perPage = 50;
|
||||
|
||||
protected $connection = NexusDB::ELOQUENT_CONNECTION_NAME;
|
||||
|
||||
const STATUS_CONFIRMED = 'confirmed';
|
||||
const STATUS_PENDING = 'pending';
|
||||
|
||||
@@ -109,6 +107,11 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
private const USER_ENABLE_LATELY = "user_enable_lately:%s";
|
||||
|
||||
public function getConnectionName()
|
||||
{
|
||||
return NexusDB::getConnectionName();
|
||||
}
|
||||
|
||||
public static function getUserEnableLatelyCacheKey(int $userId): string
|
||||
{
|
||||
return sprintf(self::USER_ENABLE_LATELY, $userId);
|
||||
|
||||
Reference in New Issue
Block a user