CrestApps / laravel-code-generator

An efficient Laravel code generator, saving time by automating the creation of resources such as views, controllers, routes, migrations, languages, and form-requests. Highly flexible and customizable, it includes a cross-browser compatible template and client-side validation for application modernization.
https://laravel-code-generator.crestapps.com
MIT License
738 stars 158 forks source link

Laravel 11 support #199

Closed julianovmartins closed 7 months ago

julianovmartins commented 7 months ago

Some files, such as Kernel.php, are no longer available in Laravel 11.

Environment:

Description:

When I execute the command create:mapped-resources, only the first file (the model) is made, and then the Exception below occurs.

Scaffolding web-based resources for menu...
A model was crafted successfully.

   Illuminate\Contracts\Container\BindingResolutionException 

  Target class [\App\Http\Kernel] does not exist.

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:906
    902▕ 
    903▕         try {
    904▕             $reflector = new ReflectionClass($concrete);
    905▕         } catch (ReflectionException $e) {
  ➜ 906▕             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    907▕         }
    908▕ 
    909▕         // If the type is not instantiable, the developer is attempting to resolve
    910▕         // an abstract type such as an Interface or Abstract Class and there is

      +47 vendor frames 

  48  artisan:13
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))

Steps/Commands To Reproduce:

By command:

php artisan create:mapped-resources

Note: All JSON files were previously created without any problems.

MikeAlhayek commented 7 months ago

@julianovmartins Are you trying to create a form-request? If so, does it work without a form-request?

julianovmartins commented 7 months ago

@MikeAlhayek, thanks for answering.

Without or with a form-request, the exception occur, for example:

php artisan create:scaffold Menu

php artisan create:scaffold Menu --with-form-request
Captura de Tela 2024-03-27 às 13 55 48
MikeAlhayek commented 7 months ago

Thank you. This is fixed and 3.0.2 was released!