migration up

This commit is contained in:
2024-07-10 14:39:37 +03:00
parent 70b2f7e5cc
commit 3df81597b6
14 changed files with 143 additions and 24 deletions

View File

@ -5,10 +5,6 @@ namespace app\controllers;
use app\helpers\Debug;
use app\models\Question;
use app\models\User;
use http\Encoding\Stream\Debrotli;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\SoftDeletes;
class UserController {
public function actionCreate(): void
@ -18,6 +14,7 @@ class UserController {
public function actionAdd(): void
{
$_REQUEST["password_hash"] = password_hash($_REQUEST["password_hash"], PASSWORD_DEFAULT);
User::create($_REQUEST);
}
@ -43,7 +40,6 @@ class UserController {
echo $user->id . "<br>";
echo $user->username . "<br>";
echo $user->email . "<br>";
echo $user->password . "<br>";
echo $user->created_at . "<br>";
echo $user->updated_at . "<br>";
}