protected function generate()
    {
        foreach ($this->listFiles as $key => $file) {
            $filePath = $this->makeFilePath($this->listFolders[$key], $this->data['name']);

            $this->resolveByPath($filePath);

            $file = $this->formatContent($file);

            //
            $find = basename($filePath);

            $filePath = strrev(preg_replace(strrev("/$find/"), '', strrev($filePath), 1));

            $filePath = $filePath .$file;

            if ($this->files->exists($filePath)) {
                return $this->error($this->type .' already exists!');
            }

            $this->makeDirectory($filePath);

            foreach ($this->signOption as $option) {
                if ($this->option($option)) {
                    $stubFile = $this->listStubs[$option][$key];

                    $this->resolveByOption($this->option($option));

                    break;
                }
            }

            if (! isset($stubFile)) {
                $stubFile = $this->listStubs['default'][$key];
            }

            $this->files->put($filePath, $this->getStubContent($stubFile));
        }

        return $this->info($this->type.' created successfully.');
    }
protected function generate()
    {
        foreach ($this->listFiles as $key => $file) {
            $filePath = $this->makeFilePath($this->listFolders[$key], $this->data['name']);

            $this->resolveByPath($filePath);

            $file = $this->formatContent($file);

            //
            $find = basename($filePath);

            $filePath = strrev(preg_replace(strrev("/$find/"), '', strrev($filePath), 1));

            $filePath = $filePath .$file;

            if ($this->files->exists($filePath)) {
                return $this->error($this->type .' already exists!');
            }

            $this->makeDirectory($filePath);

            foreach ($this->signOption as $option) {
                if ($this->option($option)) {
                    $stubFile = $this->listStubs[$option][$key];

                    $this->resolveByOption($this->option($option));

                    break;
                }
            }

            if (! isset($stubFile)) {
                $stubFile = $this->listStubs['default'][$key];
            }

            $this->files->put($filePath, $this->getStubContent($stubFile));
        }

        return $this->info($this->type.' created successfully.');
    }
protected function generate ( ) { foreach ( $ this -> listFiles as $ key => $ file ) { $ filePath = $ this -> makeFilePath ( $ this -> listFolders [ $ key ] , $ this -> data [ 'name' ] ) ; $ this -> resolveByPath ( $ filePath ) ; $ file = $ this -> formatContent ( $ file ) ; // $ find = basename ( $ filePath ) ; $ filePath = strrev ( preg_replace ( strrev ( "/$find/" ) , '' , strrev ( $ filePath ) , 1 ) ) ; $ filePath = $ filePath . $ file ; if ( $ this -> files -> exists ( $ filePath ) ) { return $ this -> error ( $ this -> type . ' already exists!' ) ; } $ this -> makeDirectory ( $ filePath ) ; foreach ( $ this -> signOption as $ option ) { if ( $ this -> option ( $ option ) ) { $ stubFile = $ this -> listStubs [ $ option ] [ $ key ] ; $ this -> resolveByOption ( $ this -> option ( $ option ) ) ; break ; } } if ( ! isset ( $ stubFile ) ) { $ stubFile = $ this -> listStubs [ 'default' ] [ $ key ] ; } $ this -> files -> put ( $ filePath , $ this -> getStubContent ( $ stubFile ) ) ; } return $ this -> info ( $ this -> type . ' created successfully.' ) ; }
generate the console command.

@return mixed
generate the console command .