pwweb / artomator

Artomator: Custom commands making life easier for Laravel.
MIT License
4 stars 1 forks source link

Failed to create views on blank Laravel project #37

Closed frankpde closed 4 years ago

frankpde commented 4 years ago

Template files seem not to be loaded as part of the dependencies. There is an option to change the artomator configuration, but running it out of the box without any adjustments (which might happen), results in below error:

ErrorException 

  file_get_contents(*****/vendor/infyomlabs/adminlte-templates/templates/scaffold/views/blade_table_body.stub): failed to open stream: No such file or directory

  at vendor/infyomlabs/laravel-generator/src/helpers.php:120
    116|     function get_template($templateName, $templateType)
    117|     {
    118|         $path = get_template_file_path($templateName, $templateType);
    119| 
  > 120|         return file_get_contents($path);
    121|     }
    122| }
    123| 
    124| if (!function_exists('fill_template')) {

      +20 vendor frames 
  21  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
frankpde commented 4 years ago

Workaround change setting in infyom/laravel_generator.php.

rabrowne85 commented 4 years ago

Added the infyomlabs/adminlte-templates package to the system so that the default is always there. Added an additional comment to the readme.md file to indicate that the config needs to be changed.