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

Remove duplicate route "voyager.roles.update" #4669

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

d3turnes
Copy link
Contributor

@d3turnes d3turnes commented Dec 31, 2019

Override controller BreadBaseController to VoyagerRoleController for roles

@codecov
Copy link

codecov bot commented Dec 31, 2019

Codecov Report

Merging #4669 into 1.3 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##               1.3   #4669   +/-   ##
=======================================
  Coverage     59.9%   59.9%           
  Complexity    1366    1366           
=======================================
  Files          194     194           
  Lines         3963    3963           
=======================================
  Hits          2374    2374           
  Misses        1589    1589

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44f1c38...126dbf6. Read the comment docs.

Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding the bug and submitting a PR for it.

To be more on line with Voyager functionalities long term solution would be to remove:
https://github.com/the-control-group/voyager/blob/05f5a4f744ba640bcbd91bcc66c914a89d710bfe/routes/voyager.php#L59

And set custom controller in BREAD settings.

Since that would be a breaking change we can't do it right now but can you change your PR?

  • Undo your changes
  • Change /routes/voyager.php#L59
-        Route::resource('roles', $namespacePrefix.'VoyagerRoleController');
+        Route::resource('roles', $namespacePrefix.'VoyagerRoleController', ['parameters' => ['roles' => 'id']]);
  • Change /publishable/database/seeds/DataTypesTableSeeder.php#L50
-                'controller'            => '',
+                'controller'            => 'TCG\\Voyager\\Http\\Controllers\\VoyagerRoleController',

Thanks!

Copy link
Collaborator

@MrCrayon MrCrayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants