protected function compileStub($stub, array $data)
    {
        $stub = $this->files->get(__DIR__ . '/../stub/' . $stub);

        foreach ($data as $key => $value) {
            $stub = str_replace('{{' . $key . '}}', $value, $stub);
        }

        return $stub;
    }