Skip to content

Instantly share code, notes, and snippets.

@tonyomendoza
Created July 11, 2020 08:15
Show Gist options
  • Select an option

  • Save tonyomendoza/d96e0970f5249e8614695f151ffcbca2 to your computer and use it in GitHub Desktop.

Select an option

Save tonyomendoza/d96e0970f5249e8614695f151ffcbca2 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
class SampleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('Users')->insert([
'username' => "admin",
'firstName' => "admin",
'email' => "admin@example.com",
'password' => Hash::make('makeUpAPassword'),//.Str::random(10)),
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment