pwweb / artomator

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

menu.blade.php missing #38

Closed frankpde closed 4 years ago

frankpde commented 4 years ago

Creating a model with graphql_scaffold results in the error that menu.blade.phpcannot be found.

ErrorException 

  file_get_contents(*****/resources/views/layouts/menu.blade.php): failed to open stream: No such file or directory

  at vendor/infyomlabs/laravel-generator/src/Generators/Scaffold/MenuGenerator.php:37
    33|             )
    34|         ).$commandData->getAddOn('menu.menu_file');
    35|         $this->templateType = config('infyom.laravel_generator.templates', 'adminlte-templates');
    36| 
  > 37|         $this->menuContents = file_get_contents($this->path);
    38| 
    39|         $templateName = 'menu_template';
    40| 
    41|         if ($this->commandData->isLocalizedTemplates()) {

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

This is a documentation issue.

For this to work you need to run the commands:

$ php artisan artomator:publish
$ php artisan ui bootstrap --auth
$ php artisan artomator.publish:layout

This will create the necessary files.

Alternatively, you can get around this by disabling the menu in the config/infyom/laravel_generator.php file:

    /*
    |--------------------------------------------------------------------------
    | Add-Ons
    |--------------------------------------------------------------------------
    |
    */

    'add_on' => [

        ...

        'menu'          => [

            'enabled'       => false,

            ...
        ],
    ],

I have also updated the readme to be more prescriptive in how to install and copied some of the InfyOmLabs Documentation in to help.