📜  laravel 通过 ids 获取项目 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:55.005000             🧑  作者: Mango

代码示例3
$user = User::create([
    'username' => $data['username'] . ' ' . $data['username2'],
    'mail' => $data['mail'],
    'password' => bcrypt($data['password']),
]);

$userInfo = UserInformation::create([
    'user_id' => $user->id,
    'current_food' => $food,
    'current_level' => $level,
]);