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

Hard coded route paths within all view templates #74

Open
willchambers99 opened this issue Oct 24, 2019 · 1 comment
Open

Hard coded route paths within all view templates #74

willchambers99 opened this issue Oct 24, 2019 · 1 comment

Comments

@willchambers99
Copy link

Hello,

All of the views that this package publishes on install include hard coded URL's rather than using named routes, whilst trying to change some of the routes around this makes it a lot harder then it should be

I wanted to suggest if it would be possible to update all of the URL's with the named routes that route::resource provides.

Please see below

|        | GET|HEAD  | admin                                                  | admin.index             | App\Http\Controllers\Admin\AdminController@index                   | web,auth,admin
|        | GET|HEAD  | admin/activitylogs                                     | activitylogs.index      | App\Http\Controllers\Admin\ActivityLogsController@index            | web,auth,admin,activitylog
|        | GET|HEAD  | admin/activitylogs/{activitylog}                       | activitylogs.show       | App\Http\Controllers\Admin\ActivityLogsController@show             | web,auth,admin,activitylog
|        | DELETE    | admin/activitylogs/{activitylog}                       | activitylogs.destroy    | App\Http\Controllers\Admin\ActivityLogsController@destroy          | web,auth,admin,activitylog
|        | POST      | admin/generator                                        |                         | Appzcoder\LaravelAdmin\Controllers\ProcessController@postGenerator | web,auth,admin
|        | GET|HEAD  | admin/generator                                        |                         | Appzcoder\LaravelAdmin\Controllers\ProcessController@getGenerator  | web,auth,admin
|        | GET|HEAD  | admin/pages                                            | pages.index             | App\Http\Controllers\Admin\PagesController@index                   | web,auth,admin
|        | POST      | admin/pages                                            | pages.store             | App\Http\Controllers\Admin\PagesController@store                   | web,auth,admin
|        | GET|HEAD  | admin/pages/create                                     | pages.create            | App\Http\Controllers\Admin\PagesController@create                  | web,auth,admin
|        | PUT|PATCH | admin/pages/{page}                                     | pages.update            | App\Http\Controllers\Admin\PagesController@update                  | web,auth,admin
|        | GET|HEAD  | admin/pages/{page}                                     | pages.show              | App\Http\Controllers\Admin\PagesController@show                    | web,auth,admin
|        | DELETE    | admin/pages/{page}                                     | pages.destroy           | App\Http\Controllers\Admin\PagesController@destroy                 | web,auth,admin
|        | GET|HEAD  | admin/pages/{page}/edit                                | pages.edit              | App\Http\Controllers\Admin\PagesController@edit                    | web,auth,admin
|        | POST      | admin/permissions                                      | permissions.store       | App\Http\Controllers\Admin\PermissionsController@store             | web,auth,admin
|        | GET|HEAD  | admin/permissions                                      | permissions.index       | App\Http\Controllers\Admin\PermissionsController@index             | web,auth,admin
|        | GET|HEAD  | admin/permissions/create                               | permissions.create      | App\Http\Controllers\Admin\PermissionsController@create            | web,auth,admin
|        | GET|HEAD  | admin/permissions/{permission}                         | permissions.show        | App\Http\Controllers\Admin\PermissionsController@show              | web,auth,admin
|        | DELETE    | admin/permissions/{permission}                         | permissions.destroy     | App\Http\Controllers\Admin\PermissionsController@destroy           | web,auth,admin
|        | PUT|PATCH | admin/permissions/{permission}                         | permissions.update      | App\Http\Controllers\Admin\PermissionsController@update            | web,auth,admin
|        | GET|HEAD  | admin/permissions/{permission}/edit                    | permissions.edit        | App\Http\Controllers\Admin\PermissionsController@edit              | web,auth,admin
|        | POST      | admin/roles                                            | roles.store             | App\Http\Controllers\Admin\RolesController@store                   | web,auth,admin
|        | GET|HEAD  | admin/roles                                            | roles.index             | App\Http\Controllers\Admin\RolesController@index                   | web,auth,admin
|        | GET|HEAD  | admin/roles/create                                     | roles.create            | App\Http\Controllers\Admin\RolesController@create                  | web,auth,admin
|        | DELETE    | admin/roles/{role}                                     | roles.destroy           | App\Http\Controllers\Admin\RolesController@destroy                 | web,auth,admin
|        | PUT|PATCH | admin/roles/{role}                                     | roles.update            | App\Http\Controllers\Admin\RolesController@update                  | web,auth,admin
|        | GET|HEAD  | admin/roles/{role}                                     | roles.show              | App\Http\Controllers\Admin\RolesController@show                    | web,auth,admin
|        | GET|HEAD  | admin/roles/{role}/edit                                | roles.edit              | App\Http\Controllers\Admin\RolesController@edit                    | web,auth,admin
|        | GET|HEAD  | admin/settings                                         | settings.index          | App\Http\Controllers\Admin\SettingsController@index                | web,auth,admin
|        | POST      | admin/settings                                         | settings.store          | App\Http\Controllers\Admin\SettingsController@store                | web,auth,admin
|        | GET|HEAD  | admin/settings/create                                  | settings.create         | App\Http\Controllers\Admin\SettingsController@create               | web,auth,admin
|        | PUT|PATCH | admin/settings/{setting}                               | settings.update         | App\Http\Controllers\Admin\SettingsController@update               | web,auth,admin
|        | GET|HEAD  | admin/settings/{setting}                               | settings.show           | App\Http\Controllers\Admin\SettingsController@show                 | web,auth,admin
|        | DELETE    | admin/settings/{setting}                               | settings.destroy        | App\Http\Controllers\Admin\SettingsController@destroy              | web,auth,admin
|        | GET|HEAD  | admin/settings/{setting}/edit                          | settings.edit           | App\Http\Controllers\Admin\SettingsController@edit                 | web,auth,admin
|        | POST      | admin/users                                            | users.store             | App\Http\Controllers\Admin\UsersController@store                   | web,auth,admin
|        | GET|HEAD  | admin/users                                            | users.index             | App\Http\Controllers\Admin\UsersController@index                   | web,auth,admin
|        | GET|HEAD  | admin/users/create                                     | users.create            | App\Http\Controllers\Admin\UsersController@create                  | web,auth,admin
|        | PUT|PATCH | admin/users/{user}                                     | users.update            | App\Http\Controllers\Admin\UsersController@update                  | web,auth,admin
|        | DELETE    | admin/users/{user}                                     | users.destroy           | App\Http\Controllers\Admin\UsersController@destroy                 | web,auth,admin
|        | GET|HEAD  | admin/users/{user}                                     | users.show              | App\Http\Controllers\Admin\UsersController@show                    | web,auth,admin
|        | GET|HEAD  | admin/users/{user}/edit                                | users.edit              | App\Http\Controllers\Admin\UsersController@edit                    | web,auth,admin

As you can see most of the named routes are already included it is just a matter of updating the views.

If you are happy to implement these changes, i would be more than willing to provide a pull request with the view template changes.

@willchambers99 willchambers99 changed the title Using named routes instead of hardcoded route paths Using named routes instead of hard coded route paths Oct 24, 2019
@willchambers99 willchambers99 changed the title Using named routes instead of hard coded route paths Hard coded route paths within all view templates Oct 24, 2019
@Michael-Stokoe
Copy link

@sohelamin

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