protected function compile($stub, $targetLocation)
    {
        $view = $this->view->make("generator.stubs::$stub", $this->context->toArray());

        $contents = $view->render();

        if($stub!='composer') {
            $contents = "<?php\r\n\r\n" . $contents;
        }

        $targetDir = base_path('/SocialiteProviders/src/'.$this->context->nameStudlyCase());
        if (!$this->files->isDirectory($targetDir)) {
            $this->files->makeDirectory($targetDir, 0755, true, true);
        }

        $this->files->put($targetDir.'/'.$targetLocation, $contents);
    }
protected function compile($stub, $targetLocation)
    {
        $view = $this->view->make("generator.stubs::$stub", $this->context->toArray());

        $contents = $view->render();

        if($stub!='composer') {
            $contents = "<?php\r\n\r\n" . $contents;
        }

        $targetDir = base_path('/SocialiteProviders/src/'.$this->context->nameStudlyCase());
        if (!$this->files->isDirectory($targetDir)) {
            $this->files->makeDirectory($targetDir, 0755, true, true);
        }

        $this->files->put($targetDir.'/'.$targetLocation, $contents);
    }
protected function compile ( $ stub , $ targetLocation ) { $ view = $ this -> view -> make ( "generator.stubs::$stub" , $ this -> context -> toArray ( ) ) ; $ contents = $ view -> render ( ) ; if ( $ stub != 'composer' ) { $ contents = "<?php\r\n\r\n" . $ contents ; } $ targetDir = base_path ( '/SocialiteProviders/src/' . $ this -> context -> nameStudlyCase ( ) ) ; if ( ! $ this -> files -> isDirectory ( $ targetDir ) ) { $ this -> files -> makeDirectory ( $ targetDir , 0755 , true , true ) ; } $ this -> files -> put ( $ targetDir . '/' . $ targetLocation , $ contents ) ; }
Generate the target file from a stub.

@param $stub
@param $targetLocation
Generate the target file from a stub .