GrafiteInc / CMS

Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.
https://cms.grafite.ca
MIT License
495 stars 104 forks source link

php artisan module:make generates exception #150

Closed jvjvjv closed 6 years ago

jvjvjv commented 6 years ago

Hey. I'm trying to just create a new module per the documentation at https://docs.grafite.ca/cms/modules/make/. When I run the command, I see the following:

$ php artisan module:make Questions
Building the admin side...
Building controller...
Building service...

   Exception  : Unable to generate your Module

  at /www/Local/Laravel/vendor/grafite/cms/src/Console/ModuleMake.php:129
    125|             $this->line('');
    126|             $this->info('Add this to your `app/Providers/RouteServiceProver.php` in the `mapWebRoutes` method:');
    127|             $this->comment("\nrequire base_path('routes/".$config['_lower_casePlural_']."-web.php');\n");
    128|         } catch (Exception $e) {
  > 129|             throw new Exception('Unable to generate your Module', 1);
    130|         }
    131| 
    132|         $this->info('Module for '.$name.' is done.');
    133|     }

  Exception trace:

  1   Grafite\Cms\Console\ModuleMake::handle()
      /www/Local/Laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

  2   call_user_func_array([])
      /www/Local/Laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

  Please use the argument -v to see more details.

After this, reloading the website gives me an error, Class '\Cms\Modules\Questions\QuestionsModuleProvider' not found, and trying to rerun the command causes:

$ php artisan module:make Questions -v

In Application.php line 637:

  Class '\Cms\Modules\Questions\QuestionsModuleProvider' not found  

Any ideas on how to fix this? I care more about the module creation issue, not the not-found issue that I am now getting. All the time.

Meta: PHP: 7.2.1 Laravel: 5.6.26 Grafite: 3.1.4

mlantz commented 6 years ago

Looks like I forgot to add the BaseService template for Basic modules, I'll release a fix this evening

mlantz commented 6 years ago

I pushed the release, so this should be resolved by running composer update. Let me know if you encounter further problems