public function generate(string $type = 'full')
    {
        $modelName = $this->modelNames['model_name'];
        $pluralModelName = $this->modelNames['plural_model_name'];

        $requestPath = $this->makeDirectory(app_path('Http/Requests/'.$pluralModelName));

        $this->generateFile(
            $requestPath.'/CreateRequest.php', $this->getContent('requests/create-request')
        );
        $this->generateFile(
            $requestPath.'/UpdateRequest.php', $this->getContent('requests/update-request')
        );

        $this->command->info($modelName.' Form Requests generated.');
    }
public function generate(string $type = 'full')
    {
        $modelName = $this->modelNames['model_name'];
        $pluralModelName = $this->modelNames['plural_model_name'];

        $requestPath = $this->makeDirectory(app_path('Http/Requests/'.$pluralModelName));

        $this->generateFile(
            $requestPath.'/CreateRequest.php', $this->getContent('requests/create-request')
        );
        $this->generateFile(
            $requestPath.'/UpdateRequest.php', $this->getContent('requests/update-request')
        );

        $this->command->info($modelName.' Form Requests generated.');
    }
public function generate ( string $ type = 'full' ) { $ modelName = $ this -> modelNames [ 'model_name' ] ; $ pluralModelName = $ this -> modelNames [ 'plural_model_name' ] ; $ requestPath = $ this -> makeDirectory ( app_path ( 'Http/Requests/' . $ pluralModelName ) ) ; $ this -> generateFile ( $ requestPath . '/CreateRequest.php' , $ this -> getContent ( 'requests/create-request' ) ) ; $ this -> generateFile ( $ requestPath . '/UpdateRequest.php' , $ this -> getContent ( 'requests/update-request' ) ) ; $ this -> command -> info ( $ modelName . ' Form Requests generated.' ) ; }
Generate class file content.

@param  string  $type Type of crud
@return void
Generate class file content .