src/Console/Commands/InitCommand.php
protected function handle()
    {
        $this->stubsDir = __DIR__.'/../../../stubs';
        $this->path = getcwd();

        if ($this->getOption('force') !== false) {
            $value = $this->ask("<info>Are you sure you want to force replacing files (y/N)?</info> ");

            if (! $value) {
                $this->info('Aborting');

                return;
            }
        }

        $this->createTestsFolder();

        $this->copyStubs([
            'bootstrap.php' => 'tests/bootstrap.php',
            'example.env' => 'tests/example.env',
            'travis.yml' => '.travis.yml',
            'phpunit.xml' => 'phpunit.xml',
            'ExampleTest.php' => 'tests/ExampleTest.php',
            'UsersTableSeeder.php' => 'tests/DatabaseSeeders/examples/UsersTableSeeder.php',
            'DataFactory.php' => 'tests/DataFactory.php',
            'DevSeedSeeder.php' => 'tests/DatabaseSeeders/examples/DevSeedSeeder.php',
        ]);

        try {
            $this->configureVariables([
                '.travis.yml' => [
                    '$$MODULE_NAME$$' => $this->getArgument('name'),
                ],
            ]);
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }

        // Done! Print success message and .gitignore instructions
        $this->info('Set up completed successfully. Please add the following lines to your .gitignore file.');
        $this->info('.env');
        $this->info('vendor/');
    }
protected function handle()
    {
        $this->stubsDir = __DIR__.'/../../../stubs';
        $this->path = getcwd();

        if ($this->getOption('force') !== false) {
            $value = $this->ask("<info>Are you sure you want to force replacing files (y/N)?</info> ");

            if (! $value) {
                $this->info('Aborting');

                return;
            }
        }

        $this->createTestsFolder();

        $this->copyStubs([
            'bootstrap.php' => 'tests/bootstrap.php',
            'example.env' => 'tests/example.env',
            'travis.yml' => '.travis.yml',
            'phpunit.xml' => 'phpunit.xml',
            'ExampleTest.php' => 'tests/ExampleTest.php',
            'UsersTableSeeder.php' => 'tests/DatabaseSeeders/examples/UsersTableSeeder.php',
            'DataFactory.php' => 'tests/DataFactory.php',
            'DevSeedSeeder.php' => 'tests/DatabaseSeeders/examples/DevSeedSeeder.php',
        ]);

        try {
            $this->configureVariables([
                '.travis.yml' => [
                    '$$MODULE_NAME$$' => $this->getArgument('name'),
                ],
            ]);
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }

        // Done! Print success message and .gitignore instructions
        $this->info('Set up completed successfully. Please add the following lines to your .gitignore file.');
        $this->info('.env');
        $this->info('vendor/');
    }
Execute the command.