post crud
This commit is contained in:
1 parent
653bf674c9
commit
25e585655c
16 files changed
+303
-46
No files matched your search
@@ -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