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;
    }
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;
    }
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 ; }
Compile the stub with the given data.

@param  string $stub
@param  array $data
@return string
@throws \Illuminate\Contracts\Filesystem\FileNotFoundException
Compile the stub with the given data .