Can i create the first record in the database via migration, where in the password
column it is already bcrypted
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->string('level');
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
User::firstOrCreate([
'name' => 'admin',
'email' => 'admin@app.com',
'level' => 'Administrator',
'password' => 'password'
]);
}
the code is working but the password
is not encrypted, any suggestion ?