app/Console/Commands/CrudGenerator.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $name = $this->argument('name');
        $options = $this->options();
        $this->modelName = $name;
        $this->modelNamePlural = Str::plural($name);
        $this->modelNameSingularLowerCase = Str::lower($name);
        $this->modelNamePluralLowerCase = Str::lower(Str::plural($name));
        if ($options['controller'] || $options['all']) {
            $this->info('Generating the controller...');
            $this->controller();
        }
        if ($options['model'] || $options['all']) {
            $this->info('Generating the model...');
            $this->model();
        }
        if ($options['request'] || $options['all']) {
            $this->info('Generating the requests...');
            $this->request();
        }
        if ($options['routes'] || $options['all']) {
            $this->info('Generating the rota...');
            $this->routes();
        }
        if ($options['views'] || $options['all']) {
            $this->info('Generating the views...');
            $this->views();
        }
        if ($options['migration'] || $options['all']) {
            $this->info('Generating the migration...');
            $this->createMigration();
        }
    }
public function handle ( ) { $ name = $ this -> argument ( 'name' ) ; $ options = $ this -> options ( ) ; $ this -> modelName = $ name ; $ this -> modelNamePlural = Str :: plural ( $ name ) ; $ this -> modelNameSingularLowerCase = Str :: lower ( $ name ) ; $ this -> modelNamePluralLowerCase = Str :: lower ( Str :: plural ( $ name ) ) ; if ( $ options [ 'controller' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the controller...' ) ; $ this -> controller ( ) ; } if ( $ options [ 'model' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the model...' ) ; $ this -> model ( ) ; } if ( $ options [ 'request' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the requests...' ) ; $ this -> request ( ) ; } if ( $ options [ 'routes' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the rota...' ) ; $ this -> routes ( ) ; } if ( $ options [ 'views' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the views...' ) ; $ this -> views ( ) ; } if ( $ options [ 'migration' ] || $ options [ 'all' ] ) { $ this -> info ( 'Generating the migration...' ) ; $ this -> createMigration ( ) ; } }
Execute the console command.
Execute the console command .