src/Commands/MakeRepositoryCommand.php
protected function checkModel()
    {
        $model = $this->appNamespace.$this->argument('model');

        $this->model = str_replace('/', '\\', $model);

        if (!$this->isLumen() && $this->laravel->runningInConsole()) {
            if (!class_exists($this->model)) {
                $response = $this->ask("Model [{$this->model}] does not exist. Would you like to create it?", 'Yes');

                if ($this->isResponsePositive($response)) {
                    Artisan::call('make:model', [
                        'name' => $this->model,
                    ]);

                    $this->line("Model [{$this->model}] has been successfully created.");
                } else {
                    $this->line("Model [{$this->model}] is not being created.");
                }
            }
        }

        $modelParts = explode('\\', $this->model);

        $this->modelName = array_pop($modelParts);
    }
protected function checkModel()
    {
        $model = $this->appNamespace.$this->argument('model');

        $this->model = str_replace('/', '\\', $model);

        if (!$this->isLumen() && $this->laravel->runningInConsole()) {
            if (!class_exists($this->model)) {
                $response = $this->ask("Model [{$this->model}] does not exist. Would you like to create it?", 'Yes');

                if ($this->isResponsePositive($response)) {
                    Artisan::call('make:model', [
                        'name' => $this->model,
                    ]);

                    $this->line("Model [{$this->model}] has been successfully created.");
                } else {
                    $this->line("Model [{$this->model}] is not being created.");
                }
            }
        }

        $modelParts = explode('\\', $this->model);

        $this->modelName = array_pop($modelParts);
    }
protected function checkModel ( ) { $ model = $ this -> appNamespace . $ this -> argument ( 'model' ) ; $ this -> model = str_replace ( '/' , '\\' , $ model ) ; if ( ! $ this -> isLumen ( ) && $ this -> laravel -> runningInConsole ( ) ) { if ( ! class_exists ( $ this -> model ) ) { $ response = $ this -> ask ( "Model [{$this->model}] does not exist. Would you like to create it?" , 'Yes' ) ; if ( $ this -> isResponsePositive ( $ response ) ) { Artisan :: call ( 'make:model' , [ 'name' => $ this -> model , ] ) ; $ this -> line ( "Model [{$this->model}] has been successfully created." ) ; } else { $ this -> line ( "Model [{$this->model}] is not being created." ) ; } } } $ modelParts = explode ( '\\' , $ this -> model ) ; $ this -> modelName = array_pop ( $ modelParts ) ; }
Check the models existance, create if wanted.
Check the models existance create if wanted .