post crud

This commit is contained in:
2024-07-25 16:15:18 +03:00
parent 653bf674c9
commit 25e585655c
16 changed files with 303 additions and 46 deletions

View File

@ -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;
}
}