post crud
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\services;
|
||||
|
||||
use app\helpers\Debug;
|
||||
use app\models\User;
|
||||
use kernel\FormModel;
|
||||
|
||||
@ -33,4 +34,13 @@ class UserService
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check(string $username): bool
|
||||
{
|
||||
if (User::where(['username' => $username])->first())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user