Skip to content

Instantly share code, notes, and snippets.

@nezarfadle
Created January 18, 2019 22:19
Show Gist options
  • Save nezarfadle/40ef9317561948aabd256d9bf2f3fe44 to your computer and use it in GitHub Desktop.
Save nezarfadle/40ef9317561948aabd256d9bf2f3fe44 to your computer and use it in GitHub Desktop.
database/seeds/DatabaseSeeder.php
<?php

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        $op = $this->command->choice('What you want to do?', [ 
        	'Seed Development Data',
        	'Seed Production Data',
        ]);
        
        switch ($op) {
        	case 0:
        		$this->call([ DevSeeder::class ]);
        		break;
        	case 1:
        		$this->call([ ProductionSeeder::class ]);
        		break;
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment