Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Last active August 10, 2019 03:50
Show Gist options
  • Save jhowbhz/95eb053289ea793062b17a7a1f1bc888 to your computer and use it in GitHub Desktop.
Save jhowbhz/95eb053289ea793062b17a7a1f1bc888 to your computer and use it in GitHub Desktop.
exemplo de um seed laravel
<?php
/*
/ in command line: php artisan make:seed UsersTableSeeder;
*/
use Illuminate\Database\Seeder;
use App\User;
class UsersTableSeeder extends Seeder
{
public function run()
{
User::create([
'name' => 'your name',
'email' => '[email protected]',
'password' => bcrypt('YOU_PASSWORD'),
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment