Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 18, 2022 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/232d2aebdcbd854271ac86d8576958d1 to your computer and use it in GitHub Desktop.
Save parzibyte/232d2aebdcbd854271ac86d8576958d1 to your computer and use it in GitHub Desktop.
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class PrimerUsuarioSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$contraseña = "123";
$user = new User([
"email" => "admin@gmail.com",
"password" => Hash::make($contraseña),
"name" => "Administrador",
]);
$user->saveOrFail();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment