📜  使用 tinker php laravel 创建用户 - PHP 代码示例

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

代码示例1
1) php artisan tinker
  
2) >>> User::create(["name"=> "laravel", "email"=>"laravel@tinker.com", "password"=>bcrypt("secret")]);
=> App\Models\User {#4290
   name: "laravel",
   email: "laravel@tinker.com",
   updated_at: "2021-04-22 08:23:28",
   created_at: "2021-04-22 08:23:28",
   id: 1,
  }
>>>