private function createRequestClass()
    {
        $requestClassName = $this->getRequestClass();
        $requestFilePath = $this->getModulePath("Requests/{$requestClassName}.php");

        if (file_exists($requestFilePath)) {
            $this->info('Request file exists. Skip.');
            return $requestFilePath;
        }

        $requestContent = view('scaffold::request', [
            'moduleNameSpace' => $this->getModuleNamespace(),
            'className'       => $requestClassName,
        ])->render();

        Utils::writeFile($requestFilePath, $requestContent);
        $this->info('Request class is set: ' . $requestClassName);
        $this->line($requestFilePath);

        return $requestFilePath;
    }
private function createRequestClass()
    {
        $requestClassName = $this->getRequestClass();
        $requestFilePath = $this->getModulePath("Requests/{$requestClassName}.php");

        if (file_exists($requestFilePath)) {
            $this->info('Request file exists. Skip.');
            return $requestFilePath;
        }

        $requestContent = view('scaffold::request', [
            'moduleNameSpace' => $this->getModuleNamespace(),
            'className'       => $requestClassName,
        ])->render();

        Utils::writeFile($requestFilePath, $requestContent);
        $this->info('Request class is set: ' . $requestClassName);
        $this->line($requestFilePath);

        return $requestFilePath;
    }
private function createRequestClass ( ) { $ requestClassName = $ this -> getRequestClass ( ) ; $ requestFilePath = $ this -> getModulePath ( "Requests/{$requestClassName}.php" ) ; if ( file_exists ( $ requestFilePath ) ) { $ this -> info ( 'Request file exists. Skip.' ) ; return $ requestFilePath ; } $ requestContent = view ( 'scaffold::request' , [ 'moduleNameSpace' => $ this -> getModuleNamespace ( ) , 'className' => $ requestClassName , ] ) -> render ( ) ; Utils :: writeFile ( $ requestFilePath , $ requestContent ) ; $ this -> info ( 'Request class is set: ' . $ requestClassName ) ; $ this -> line ( $ requestFilePath ) ; return $ requestFilePath ; }
Create Request Class
@return string
Create Request Class