src/Commands/MigrationCommand.php
public function fire()
    {
        $this->laravel->view->addNamespace('laravel-shop', substr(__DIR__, 0, -8).'views');

        $cartTable          = Config::get('shop.cart_table');
        $itemTable          = Config::get('shop.item_table');
        $couponTable        = Config::get('shop.coupon_table');
        $orderStatusTable   = Config::get('shop.order_status_table');
        $orderTable         = Config::get('shop.order_table');
        $transactionTable   = Config::get('shop.transaction_table');

        // Migrations
        $this->line('');
        $this->info( "Tables: $cartTable, $itemTable" );

        $message = "A migration that creates '$cartTable', '$itemTable', '$orderTable'".
        " tables will be created in database/migrations directory";

        $this->comment($message);
        $this->line('');

        if ($this->confirm('Proceed with the migration creation? [Yes|no]', 'Yes')) {

            $this->line('');

            $this->info('Creating migration...');
            if ($this->createMigration(compact(
                    'cartTable',
                    'itemTable',
                    'couponTable',
                    'orderStatusTable',
                    'orderTable',
                    'transactionTable'
                ))
            ) {

                $this->info('Migration successfully created!');
            } else {
                $this->error(
                    "Couldn't create migration.\n Check the write permissions".
                    " within the database/migrations directory."
                );
            }

        }

        // Seeder

        $this->line('');
        $this->info( "Table seeders: $orderStatusTable" );
        $message = "A seeder that seeds '$orderStatusTable' table(s) with data. Will be created in database/seeds directory";

        $this->comment($message);
        $this->line('');

        if ($this->confirm('Proceed with the seeder creation? [Yes|no]', 'Yes')) {

            $this->line('');

            $this->info('Creating seeder...');
            if ($this->createSeeder(compact(
                    'cartTable',
                    'itemTable',
                    'couponTable',
                    'orderStatusTable',
                    'orderTable',
                    'transactionTable'
                ))
            ) {
                $this->info('Seeder successfully created!');
            } else {
                $this->error(
                    "Couldn't create seeder.\n Check the write permissions".
                    " within the database/seeds directory."
                );
            }

        }
    }
public function fire()
    {
        $this->laravel->view->addNamespace('laravel-shop', substr(__DIR__, 0, -8).'views');

        $cartTable          = Config::get('shop.cart_table');
        $itemTable          = Config::get('shop.item_table');
        $couponTable        = Config::get('shop.coupon_table');
        $orderStatusTable   = Config::get('shop.order_status_table');
        $orderTable         = Config::get('shop.order_table');
        $transactionTable   = Config::get('shop.transaction_table');

        // Migrations
        $this->line('');
        $this->info( "Tables: $cartTable, $itemTable" );

        $message = "A migration that creates '$cartTable', '$itemTable', '$orderTable'".
        " tables will be created in database/migrations directory";

        $this->comment($message);
        $this->line('');

        if ($this->confirm('Proceed with the migration creation? [Yes|no]', 'Yes')) {

            $this->line('');

            $this->info('Creating migration...');
            if ($this->createMigration(compact(
                    'cartTable',
                    'itemTable',
                    'couponTable',
                    'orderStatusTable',
                    'orderTable',
                    'transactionTable'
                ))
            ) {

                $this->info('Migration successfully created!');
            } else {
                $this->error(
                    "Couldn't create migration.\n Check the write permissions".
                    " within the database/migrations directory."
                );
            }

        }

        // Seeder

        $this->line('');
        $this->info( "Table seeders: $orderStatusTable" );
        $message = "A seeder that seeds '$orderStatusTable' table(s) with data. Will be created in database/seeds directory";

        $this->comment($message);
        $this->line('');

        if ($this->confirm('Proceed with the seeder creation? [Yes|no]', 'Yes')) {

            $this->line('');

            $this->info('Creating seeder...');
            if ($this->createSeeder(compact(
                    'cartTable',
                    'itemTable',
                    'couponTable',
                    'orderStatusTable',
                    'orderTable',
                    'transactionTable'
                ))
            ) {
                $this->info('Seeder successfully created!');
            } else {
                $this->error(
                    "Couldn't create seeder.\n Check the write permissions".
                    " within the database/seeds directory."
                );
            }

        }
    }
Execute the console command.

@return void