Skip to content

ErrorException : compact(): Undefined variable: viewName #102

@HAFVL007

Description

@HAFVL007

Environment:

  • Laravel-Code-Generator Version: 2.2
  • Laravel Version: 5.7

Description:

Error message when creating resources from existing database/table

Steps/Commands To Reproduce:

php artisan create:resources Employee --with-migration --table-exists --force
The "employees.json" file was crafted successfully!
Scaffolding resources for employee...
A model was crafted successfully.

ErrorException : compact(): Undefined variable: viewName

at C:\xampp\htdocs\crestapps\vendor\crestapps\laravel-code-generator\src\Commands\CreateControllerCommand.php:398
394| 'template',
395| 'controllerName',
396| 'extends',
397| 'withAuth',

398| 'controllerDirectory'
399| );
400| }
401|
402| /**

Exception trace:

1 compact("formRequestDirectory", "viewDirectory", "viewName", "modelName", "prefix", "perPage", "fileSnippet", "modelDirectory", "langFile", "fields", "withFormRequest", "formRequestName", "force", "resourceFile", "template", "controllerName", "extends", "withAuth", "controllerDirectory")
C:\xampp\htdocs\crestapps\vendor\crestapps\laravel-code-generator\src\Commands\CreateControllerCommand.php:398

2 CrestApps\CodeGenerator\Commands\CreateControllerCommand::getCommandInput()
C:\xampp\htdocs\crestapps\vendor\crestapps\laravel-code-generator\src\Commands\CreateControllerCommand.php:86

Please use the argument -v to see more details.

Content Of The Resource-File:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions