misterdebug / crud-generator-laravel

Create a Laravel 10 CRUD in a few seconds
315 stars 44 forks source link

Error while installing #7

Closed imrjat closed 1 year ago

imrjat commented 1 year ago

I trying to install this package in my fresh laravel 9 project. I Run composer command:

composer require mrdebug/crudgen --dev

and get this error.

**Target class [Mrdebug\Crudgen\Services\API\RemoveApiCrudService] does not exist.**

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:877
    873▕ 
    874▕         try {
    875▕             $reflector = new ReflectionClass($concrete);
    876▕         } catch (ReflectionException $e) {
  ➜ 877▕             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    878▕         }
    879▕ 
    880▕         // If the type is not instantiable, the developer is attempting to resolve
    881▕         // an abstract type such as an Interface or Abstract Class and there is

      +20 vendor frames 
  21  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
misterdebug commented 1 year ago

Hi @coderahuljat, i think the problem comes from use Mrdebug\Crudgen\Services\API\RemoveApiCrudService; in src/Console/RemoveApiCrud.php It should be use Mrdebug\Crudgen\Services\Api\RemoveApiCrudService; (not API)

I can't fix right now but can you try and say me if this quick fix helps you? Thx :)

misterdebug commented 1 year ago

it should be good https://github.com/misterdebug/crud-generator-laravel/commit/933c742befcbf940ebb4cd991751ab5e084ccd49 :)