This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
ModuleWeb/SRC/database/seeds/DatabaseSeeder.php
2015-02-15 07:12:44 +01:00

41 lines
669 B
PHP
Executable File

<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call('UserTableSeeder');
}
}
class UserTableSeeder extends Seeder {
public function run()
{
// Uncomment the below to wipe the table clean before populating
//DB::table('users')->truncate();
$user = array(
'name' => 'lolman',
'email' => 'quentin.rouland@laposte.net',
'password' => Hash::make('admin'),
'image' => ''
);
// Uncomment the below to run the seeder
DB::table('users')->insert($user);
}
}