classes/Commands/Generate.php
private function generateView()
    {
        // Figure out the naming
        $path = 'resources/views/admin/'
            . Str::plural(Str::snake($this->argument('model')))
            . '/edit.haml';
        $file = base_path().'/'.$path;

        // Copy the stub over
        if (!file_exists(dirname($file))) {
            mkdir(dirname($file), 0744, true);
        }
        if (file_exists($file)) {
            return $this->comment('View already exists: '.$path);
        }
        copy($this->stubs.'/view.stub', $file);
        $this->info('View created: '.$path);
    }
private function generateView()
    {
        // Figure out the naming
        $path = 'resources/views/admin/'
            . Str::plural(Str::snake($this->argument('model')))
            . '/edit.haml';
        $file = base_path().'/'.$path;

        // Copy the stub over
        if (!file_exists(dirname($file))) {
            mkdir(dirname($file), 0744, true);
        }
        if (file_exists($file)) {
            return $this->comment('View already exists: '.$path);
        }
        copy($this->stubs.'/view.stub', $file);
        $this->info('View created: '.$path);
    }
private function generateView ( ) { // Figure out the naming $ path = 'resources/views/admin/' . Str :: plural ( Str :: snake ( $ this -> argument ( 'model' ) ) ) . '/edit.haml' ; $ file = base_path ( ) . '/' . $ path ; // Copy the stub over if ( ! file_exists ( dirname ( $ file ) ) ) { mkdir ( dirname ( $ file ) , 0744 , true ) ; } if ( file_exists ( $ file ) ) { return $ this -> comment ( 'View already exists: ' . $ path ) ; } copy ( $ this -> stubs . '/view.stub' , $ file ) ; $ this -> info ( 'View created: ' . $ path ) ; }
Create the view file
Create the view file