Created
November 7, 2013 14:45
-
-
Save crynobone/7355734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DatabaseSeeder extends Seeder { | |
/** | |
* Run the database seeds. | |
* | |
* @return void | |
*/ | |
public function run() | |
{ | |
Eloquent::unguard(); | |
$this->call('RemindersTableSeeder'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ExampleTest extends TestCase { | |
/** | |
* A basic functional test example. | |
* | |
* @return void | |
*/ | |
public function testBasicExample() | |
{ | |
$this->seed(); | |
} | |
/** | |
* Seed a given database connection. | |
* | |
* @param string $class | |
* @return void | |
*/ | |
public function seed($class = 'DatabaseSeeder') | |
{ | |
$artisan = $this->app['artisan']; | |
$artisan->call('db:seed', array('--class' => $class)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RemindersTableSeeder extends Seeder { | |
/** | |
* Run the database seeds. | |
* | |
* @return void | |
*/ | |
public function run() | |
{ | |
DB::table('password_reminders')->insert([ | |
'email' => 'crynobone@gmail.com', | |
'token' => md5('foo'), | |
'created_at' => Carbon\Carbon::now(), | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment