protected function makeFiles()
    {
        $this->namespace = $this->getRootNameSpace();

        $this->className = $this->getClassName();

        // copy files
        $this->copy([
            __DIR__.'/stubs/extension/view.stub'       => 'resources/views/index.blade.php',
            __DIR__.'/stubs/extension/.gitignore.stub' => '.gitignore',
            __DIR__.'/stubs/extension/README.md.stub'  => 'README.md',
            __DIR__.'/stubs/extension/LICENSE.stub'    => 'LICENSE',
        ]);

        // make composer.json
        $composerContents = str_replace(
            [':package', ':namespace', ':class_name'],
            [$this->package, str_replace('\\', '\\\\', $this->namespace).'\\\\', $this->className],
            file_get_contents(__DIR__.'/stubs/extension/composer.json.stub')
        );
        $this->putFile('composer.json', $composerContents);

        // make class
        $classContents = str_replace(
            [':namespace', ':class_name', ':title', ':path', ':base_package'],
            [$this->namespace, $this->className, Str::title($this->className), basename($this->package), basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/extension.stub')
        );
        $this->putFile("src/{$this->className}.php", $classContents);

        // make service provider
        $providerContents = str_replace(
            [':namespace', ':class_name', ':base_package', ':package'],
            [$this->namespace, $this->className, basename($this->package), $this->package],
            file_get_contents(__DIR__.'/stubs/extension/service-provider.stub')
        );
        $this->putFile("src/{$this->className}ServiceProvider.php", $providerContents);

        // make controller
        $controllerContent = str_replace(
            [':namespace', ':class_name', ':base_package'],
            [$this->namespace, $this->className, basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/controller.stub')
        );
        $this->putFile("src/Http/Controllers/{$this->className}Controller.php", $controllerContent);

        // make routes
        $routesContent = str_replace(
            [':namespace', ':class_name', ':path'],
            [$this->namespace, $this->className, basename($this->package)],
            file_get_contents(__DIR__.'/stubs/extension/routes.stub')
        );
        $this->putFile('routes/web.php', $routesContent);
    }