InfyOmLabs / adminlte-templates

AdminLTE V3 templates for InfyOm Laravel Generator
https://infyom.com/open-source/laravelgenerator/docs/8.0/adminlte-templates
MIT License
269 stars 119 forks source link

[Feature] Template not found when localized is set to true #82

Closed skys215 closed 2 years ago

skys215 commented 2 years ago

When the localized is set to true, running commands like infyom:api_scaffold, infyom.publish:layout --localized will show an error that the stub file is missing.

copy(~/laravel/vendor/infyomlabs/adminlte-templates/templates/scaffold/layouts/app_locale.stub): Failed to open stream: No such file or directory

  at vendor/infyomlabs/laravel-generator/src/Commands/Publish/PublishBaseCommand.php:20
     16▕         if (file_exists($destinationFile) && !$this->confirmOverwrite($destinationFile)) {
     17▕             return;
     18▕         }
     19▕
  ➜  20▕         copy($sourceFile, $destinationFile);
     21▕
     22▕         $this->comment($fileName.' published');
     23▕         $this->info($destinationFile);
     24▕     }
*** routes added.
   ErrorException
  file_get_contents(~/laravel/vendor/infyomlabs/adminlte-templates/templates/scaffold/layouts/menu_template_locale.stub): Failed to open stream: No such file or directory

  at vendor/infyomlabs/laravel-generator/src/helpers.php:138
    134▕     function get_template($templateName, $templateType)
    135▕     {
    136▕         $path = get_template_file_path($templateName, $templateType);
    137▕
  ➜ 138▕         return file_get_contents($path);
    139▕     }
    140▕ }

composer.json:

        "php": "^8.0.2",
        "doctrine/dbal": "^3.3",
        "guzzlehttp/guzzle": "^7.2",
        "infyomlabs/adminlte-templates": "^4.0",
        "infyomlabs/laravel-generator": "^4.0",
        "laravel/framework": "^9.2",
        "laravel/sanctum": "^2.14.1",
        "laravel/tinker": "^2.7",
        "laravel/ui": "^3.4",

macOS 12.3 php v8.1.3 Laravel v9.3.1 infyomlabs/adminlte-templates v4.0.0 infyomlabs/laravel-generator v4.0.0 infyomlabs/laravel-generator-helpers v4.0.0 infyomlabs/laravel-ui-adminlte v4.0.0

hooman-mirghasemi commented 2 years ago

I have same problem

mitulgolakiya commented 2 years ago

Localization support is added in v5.1.0.