InfyOmLabs / laravel-generator

API and Admin Panel CRUD Generator for Laravel.
https://www.infyom.com/open-source
MIT License
3.79k stars 813 forks source link

route helper acting weird since latest update #78

Closed vesper8 closed 8 years ago

vesper8 commented 8 years ago

I just did a composer update and got the latest dev-master changes and I noticed a change in behavior.

In my scaffold view... the edit and show buttons that used to work properly are now sending me to the api route instead.

What I mean, let's say I have a model "State". By going to /states you see the scaffolding of all my states with the show, edit and destroy buttons.

Those buttons use route('states.show', [$data->id]) and route('states.edit', [$data->id]) to generate the route url.

Prior to composer update this would link to /states/1 and /states/1/edit, but after the update it now links to /api/v1/states/1 and /api/v1/states/1/edit

Which obviously doesn't work... Is this a bug you introduced or is there something I am missing?

The delete button also suffers from the same issue.

mitulgolakiya commented 8 years ago

Can you post your generated files with config/infyom/laravel_generator.php and routes.php and api_routes.php ?

mitulgolakiya commented 8 years ago

Tested everything and working fine.