database/seeds/BotSeeder.php
/**
	 * Run the database seeds.
	 *
	 * @return void
	 */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
	{
		$current_count = count(\App\User::bots());
		for ($i = $current_count; $i < self::BOT_COUNT; $i++) {
			$user = new \App\User([
				'name' => 'Bot',
				'email' => str_random(40).'@bot.com',
				'role' => \App\User::ROLE_BOT
			]);
			$user->password = str_random(60);
			$user->save();
		}
	}
public function run ( ) { $ current_count = count ( \ App \ User :: bots ( ) ) ; for ( $ i = $ current_count ; $ i < self :: BOT_COUNT ; $ i ++ ) { $ user = new \ App \ User ( [ 'name' => 'Bot' , 'email' => str_random ( 40 ) . '@bot.com' , 'role' => \ App \ User :: ROLE_BOT ] ) ; $ user -> password = str_random ( 60 ) ; $ user -> save ( ) ; } }
Run the database seeds.
Run the database seeds .