Skip to content

Instantly share code, notes, and snippets.

@csinghdev
Created April 27, 2020 18:18
Show Gist options
  • Save csinghdev/b94a161c9e41483f2ee421917b3d1e08 to your computer and use it in GitHub Desktop.
Save csinghdev/b94a161c9e41483f2ee421917b3d1e08 to your computer and use it in GitHub Desktop.
Simple Users Table Seeder Example
<?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'name' => 'John Doe',
'email' => 'john@example.com',
'password' => 'test'
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment