Created
December 9, 2014 14:05
-
-
Save alnutile/8026859b77f95d408d60 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| use Illuminate\Database\Seeder; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Support\Facades\App; | |
| use Illuminate\Support\Facades\Config; | |
| use Illuminate\Support\Facades\DB; | |
| class DatabaseSeeder extends Seeder { | |
| /** | |
| * Run the database seeds. | |
| * | |
| * @return void | |
| */ | |
| public function run() | |
| { | |
| Model::unguard(); | |
| if(App::environment() != 'testing') { | |
| DB::statement('SET FOREIGN_KEY_CHECKS=0;'); | |
| } | |
| $this->call('AppTableSeeder'); | |
| $this->call('ParentRequestExample'); | |
| $this->call('ProductionSeeder'); | |
| if(App::environment() != 'testing') { | |
| DB::statement('SET FOREIGN_KEY_CHECKS=1;'); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment