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

[Error] php artisan route:list #174

Closed
gsc89 opened this issue May 31, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@gsc89
Copy link

commented May 31, 2016

I get this error when using the command in the title.

Cannot use InfyOm\Generator\Controller\AppBaseController as AppBaseController because the name is already in use

Any ideas?

My app still works I just need to look at the list of routes I have.

Sorry if this is a stupid question I did a google and it was mentioned before but it was supposed to be fixed after that issue was posted.

@gsc89 gsc89 changed the title php artisan route:list broken. [Error] php artisan route:list May 31, 2016

@mitulgolakiya

This comment has been minimized.

Copy link
Member

commented Jun 1, 2016

@gsc89 its already in progress. Track it here #166
I think the reason of these both issues is same.

@mitulgolakiya mitulgolakiya added this to the 0.1 milestone Jun 1, 2016

@gsc89

This comment has been minimized.

Copy link
Author

commented Jun 1, 2016

Ah ok sorry thanks man! keep up the amazing work its truly great.

mitulgolakiya added a commit that referenced this issue Jun 2, 2016

@mitulgolakiya

This comment has been minimized.

Copy link
Member

commented Jun 2, 2016

@gsc89 Can you setup it again with a new code and with a fresh new installation by removing all published stuff and check it again ?

@gsc89

This comment has been minimized.

Copy link
Author

commented Jun 2, 2016

Hi thanks for your time but I can't re-generate any of the files I am currently working on as I am 150+ hours into coding on this project and made far too many changes to the files which were generated.

I will have to manually fix each file based on the code changes I see you have made. Sorry I can't be more help I simply can't re-generate on this project its far too far a long now.

I take it that is what you meant?

@wsl

This comment has been minimized.

Copy link

commented Jun 2, 2016

I had the same issue and with a scratch project with
"infyomlabs/laravel-generator": "dev-master#7270cb5ffc019bc622956c10417670d12641e95c",
in composer.json I now get

[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected '$NAMESPACE_BASE_CONTROLLER' (T_VARIABLE), expecting identifier (T_STRING) or \ (T_NS_SEPARATOR) or '{'

when running php artisan route:list

(after running php artisan infyom:api_scaffold Product --fromTable --tableName=products)

@gsc89

This comment has been minimized.

Copy link
Author

commented Jun 3, 2016

All of my scaffolding was generated from table

mitulgolakiya added a commit that referenced this issue Jun 5, 2016

@mitulgolakiya

This comment has been minimized.

Copy link
Member

commented Jun 5, 2016

@wsl it's not fixed in develop branch.

@gsc89 Np. I checked it on my end and not its working fine.

@axyr

This comment has been minimized.

Copy link

commented Jun 18, 2016

This happened to me when using a prefixed route and already heaving a prefixed route group.

This will generate the error Cannot use InfyOm\Generator\Controller\AppBaseController as AppBaseController because the name is already in use

Route::group(['prefix' => 'admin'], function () {
    Route::resource('companies', 'CompanyController');
});

Route::get('admin/users', ['as'=> 'admin.users.index', 'uses' => 'UserController@index']);
Route::post('admin/users', ['as'=> 'admin.users.store', 'uses' => 'UserController@store']);
Route::get('admin/users/create', ['as'=> 'admin.users.create', 'uses' => 'UserController@create']);
Route::patch('admin/users/{users}', ['as'=> 'admin.users.update', 'uses' => 'UserController@update']);
Route::delete('admin/users/{users}', ['as'=> 'admin.users.destroy', 'uses' => 'UserController@destroy']);
Route::get('admin/users/{users}', ['as'=> 'admin.users.show', 'uses' => 'UserController@show']);
Route::get('admin/users/{users}/edit', ['as'=> 'admin.users.edit', 'uses' => 'UserController@edit']);

wtom pushed a commit to wtom/laravel-generator that referenced this issue Jul 20, 2016

wtom
Merge commit '4044c8c3e6c1b5541244b7117b0f7677ca7702bb' into create_u…
…pdate_relationships

* commit '4044c8c3e6c1b5541244b7117b0f7677ca7702bb': (32 commits)
  InfyOmLabs#102 patch route added
  =fixed route named prefix in controllers
  Applied fixes from StyleCI
  InfyOmLabs#194 fields not generated fix
  fixed instruction
  Applied fixes from StyleCI
  InfyOmLabs#155 diff routes when prefix is used
  Applied fixes from StyleCI
  InfyOmLabs#87 option to specify to generate only specific views
  InfyOmLabs#172 cli option to turn on/off datatables
  Applied fixes from StyleCI
  InfyOmLabs#179 InfyOmLabs#174 InfyOmLabs#166 AppBaseController uses prefix now
  InfyOmLabs#155 prefix fixes
  return Not Found HTTP CODE 404 to pass ApiTest
  update to seperate directories
  added instructions for using the new prefixes
  Updated to use prefixes
  Updated to use the new prefixes
  InfyOmLabs#166 InfyOmLabs#174 appbase controller fix
  rename ROUTES_AS_PREFIX to VIEW_PREFIX
  ...

wtom pushed a commit to wtom/laravel-generator that referenced this issue Jul 20, 2016

wtom
Merge commit '4044c8c3e6c1b5541244b7117b0f7677ca7702bb'
* commit '4044c8c3e6c1b5541244b7117b0f7677ca7702bb': (32 commits)
  InfyOmLabs#102 patch route added
  =fixed route named prefix in controllers
  Applied fixes from StyleCI
  InfyOmLabs#194 fields not generated fix
  fixed instruction
  Applied fixes from StyleCI
  InfyOmLabs#155 diff routes when prefix is used
  Applied fixes from StyleCI
  InfyOmLabs#87 option to specify to generate only specific views
  InfyOmLabs#172 cli option to turn on/off datatables
  Applied fixes from StyleCI
  InfyOmLabs#179 InfyOmLabs#174 InfyOmLabs#166 AppBaseController uses prefix now
  InfyOmLabs#155 prefix fixes
  return Not Found HTTP CODE 404 to pass ApiTest
  update to seperate directories
  added instructions for using the new prefixes
  Updated to use prefixes
  Updated to use the new prefixes
  InfyOmLabs#166 InfyOmLabs#174 appbase controller fix
  rename ROUTES_AS_PREFIX to VIEW_PREFIX
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.