Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few issues #46

Closed
SaintGiff opened this issue Jan 17, 2016 · 1 comment
Closed

A few issues #46

SaintGiff opened this issue Jan 17, 2016 · 1 comment

Comments

@SaintGiff
Copy link

I'm new to laravel so this may be an error on my end, however I am encountering the following issues.

When generating controllers with

php artisan crud:generate Posts --route=yes --view-path="admin" --namespace=Admin --route-group=admin

I get the controller and model in the proper namespace, and the route is correct in routes.php. However, the controller class is empty. None of the methods are generated. And no views are generated.

When I try to generate just a controller, say, if I wanted a separate UsersController within Admin, I am unable to use --route or --namespace as option. This essentially means that I am unable to create the controller within Admin.

Any attempt to generate views for any controller results in a Symfony undefined offset: 1 error.

@sohelamin
Copy link
Owner

Hi @SaintGiff

Maybe you forgot to include the fields.
You must need to define fields as well for this operation.
eg:

php artisan crud:generate Posts --fields="title:string:required, body:text:required" --route=yes --pk=id --view-path="admin" --namespace=Admin --route-group=admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants