thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.8k stars 2.67k forks source link

breadcrumb url wrong #2376

Closed bradapeter closed 6 years ago

bradapeter commented 6 years ago

Description:

when you edit the post. dashboard > Posts > Edit. you will find this breadcrumb's Posts link is wrong. it will be link to /posts, not the /admin/posts . Here I am change the 'admin' prefix to 'backend', so I should get the /backend/posts,

Are you sure this is redirect to frontend to browse the post article, not the backend posts list.

thx.

fletch3555 commented 6 years ago

The breadcrumb links use named routes, so it shouldn't be incorrect. Can you provide the output of artisan route:list?

bradapeter commented 6 years ago

I just put the whole route:list to here. it's too long. apple@MBP  ~/code/voy  artisan route:list +--------+-----------+-------------------------------------------------+--------------------------------------------+----------------------------------------------------------------------------+----------------+ | Domain | Method | URI | Name | Action | Middleware | +--------+-----------+-------------------------------------------------+--------------------------------------------+----------------------------------------------------------------------------+----------------+ | | GET|HEAD | / | | Closure | web | | | GET|HEAD | api/user | | Closure | api,auth:api | | | GET|HEAD | arrilot/load-widget | | Arrilot\Widgets\Controllers\WidgetController@showWidget | | | | GET|HEAD | backend | voyager.dashboard | \TCG\Voyager\Http\Controllers\VoyagerController@index | web,admin.user | | | GET|HEAD | backend/categories | voyager.categories.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | POST | backend/categories | voyager.categories.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/categories/create | voyager.categories.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | DELETE | backend/categories/{category} | voyager.categories.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | GET|HEAD | backend/categories/{category} | voyager.categories.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | PUT|PATCH | backend/categories/{category} | voyager.categories.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | GET|HEAD | backend/categories/{category}/edit | voyager.categories.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | POST | backend/compass | voyager.compass.post | \TCG\Voyager\Http\Controllers\VoyagerCompassController@index | web,admin.user | | | GET|HEAD | backend/compass | voyager.compass.index | \TCG\Voyager\Http\Controllers\VoyagerCompassController@index | web,admin.user | | | POST | backend/database | voyager.database.store | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@store | web,admin.user | | | GET|HEAD | backend/database | voyager.database.index | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@index | web,admin.user | | | POST | backend/database/bread | voyager.database.bread.store | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@storeBread | web,admin.user | | | GET|HEAD | backend/database/bread/delete_relationship/{id} | voyager.database.bread.delete_relationship | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@deleteRelationship | web,admin.user | | | POST | backend/database/bread/relationship | voyager.database.bread.relationship | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@addRelationship | web,admin.user | | | DELETE | backend/database/bread/{id} | voyager.database.bread.delete | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@deleteBread | web,admin.user | | | PUT | backend/database/bread/{id} | voyager.database.bread.update | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@updateBread | web,admin.user | | | GET|HEAD | backend/database/create | voyager.database.create | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@create | web,admin.user | | | DELETE | backend/database/{database} | voyager.database.destroy | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@destroy | web,admin.user | | | GET|HEAD | backend/database/{database} | voyager.database.show | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@show | web,admin.user | | | PUT|PATCH | backend/database/{database} | voyager.database.update | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@update | web,admin.user | | | GET|HEAD | backend/database/{database}/edit | voyager.database.edit | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@edit | web,admin.user | | | GET|HEAD | backend/database/{table}/bread/create | voyager.database.bread.create | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@addBread | web,admin.user | | | GET|HEAD | backend/database/{table}/bread/edit | voyager.database.bread.edit | \TCG\Voyager\Http\Controllers\VoyagerDatabaseController@addEditBread | web,admin.user | | | GET|HEAD | backend/hooks | voyager.hooks | \Larapack\VoyagerHooks\Controllers\HooksController@index | web,admin.user | | | POST | backend/hooks | voyager.hooks.install | \Larapack\VoyagerHooks\Controllers\HooksController@install | web,admin.user | | | DELETE | backend/hooks/{name} | voyager.hooks.uninstall | \Larapack\VoyagerHooks\Controllers\HooksController@uninstall | web,admin.user | | | GET|HEAD | backend/hooks/{name}/disable | voyager.hooks.disable | \Larapack\VoyagerHooks\Controllers\HooksController@disable | web,admin.user | | | GET|HEAD | backend/hooks/{name}/enable | voyager.hooks.enable | \Larapack\VoyagerHooks\Controllers\HooksController@enable | web,admin.user | | | GET|HEAD | backend/hooks/{name}/update | voyager.hooks.update | \Larapack\VoyagerHooks\Controllers\HooksController@update | web,admin.user | | | GET|HEAD | backend/login | voyager.login | \TCG\Voyager\Http\Controllers\VoyagerAuthController@login | web | | | POST | backend/login | voyager.postlogin | \TCG\Voyager\Http\Controllers\VoyagerAuthController@postLogin | web | | | POST | backend/logout | voyager.logout | \TCG\Voyager\Http\Controllers\VoyagerController@logout | web,admin.user | | | GET|HEAD | backend/media | voyager.media.index | \TCG\Voyager\Http\Controllers\VoyagerMediaController@index | web,admin.user | | | POST | backend/media/crop | voyager.media.crop | \TCG\Voyager\Http\Controllers\VoyagerMediaController@crop | web,admin.user | | | POST | backend/media/delete_file_folder | voyager.media.delete_file_folder | \TCG\Voyager\Http\Controllers\VoyagerMediaController@delete_file_folder | web,admin.user | | | POST | backend/media/directories | voyager.media.get_all_dirs | \TCG\Voyager\Http\Controllers\VoyagerMediaController@get_all_dirs | web,admin.user | | | POST | backend/media/files | voyager.media.files | \TCG\Voyager\Http\Controllers\VoyagerMediaController@files | web,admin.user | | | POST | backend/media/move_file | voyager.media.move_file | \TCG\Voyager\Http\Controllers\VoyagerMediaController@move_file | web,admin.user | | | POST | backend/media/new_folder | voyager.media.new_folder | \TCG\Voyager\Http\Controllers\VoyagerMediaController@new_folder | web,admin.user | | | POST | backend/media/remove | voyager.media.remove | \TCG\Voyager\Http\Controllers\VoyagerMediaController@remove | web,admin.user | | | POST | backend/media/rename_file | voyager.media.rename_file | \TCG\Voyager\Http\Controllers\VoyagerMediaController@rename_file | web,admin.user | | | POST | backend/media/upload | voyager.media.upload | \TCG\Voyager\Http\Controllers\VoyagerMediaController@upload | web,admin.user | | | POST | backend/menus | voyager.menus.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/menus | voyager.menus.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | GET|HEAD | backend/menus/create | voyager.menus.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | DELETE | backend/menus/{menu} | voyager.menus.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | PUT|PATCH | backend/menus/{menu} | voyager.menus.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | GET|HEAD | backend/menus/{menu} | voyager.menus.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | GET|HEAD | backend/menus/{menu}/builder | voyager.menus.builder | \TCG\Voyager\Http\Controllers\VoyagerMenuController@builder | web,admin.user | | | GET|HEAD | backend/menus/{menu}/edit | voyager.menus.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | POST | backend/menus/{menu}/item | voyager.menus.item.add | \TCG\Voyager\Http\Controllers\VoyagerMenuController@add_item | web,admin.user | | | PUT | backend/menus/{menu}/item | voyager.menus.item.update | \TCG\Voyager\Http\Controllers\VoyagerMenuController@update_item | web,admin.user | | | DELETE | backend/menus/{menu}/item/{id} | voyager.menus.item.destroy | \TCG\Voyager\Http\Controllers\VoyagerMenuController@delete_menu | web,admin.user | | | POST | backend/menus/{menu}/order | voyager.menus.order | \TCG\Voyager\Http\Controllers\VoyagerMenuController@order_item | web,admin.user | | | POST | backend/pages | voyager.pages.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/pages | voyager.pages.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | GET|HEAD | backend/pages/create | voyager.pages.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | PUT|PATCH | backend/pages/{page} | voyager.pages.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | DELETE | backend/pages/{page} | voyager.pages.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | GET|HEAD | backend/pages/{page} | voyager.pages.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | GET|HEAD | backend/pages/{page}/edit | voyager.pages.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | GET|HEAD | backend/polls | voyager.polls | \VoyagerPolls\Http\Controllers\PollsController@browse | web,admin.user | | | GET|HEAD | backend/polls/add | voyager.polls.add | \VoyagerPolls\Http\Controllers\PollsController@add | web,admin.user | | | POST | backend/polls/add | voyager.polls.add.post | \VoyagerPolls\Http\Controllers\PollsController@add_post | web,admin.user | | | DELETE | backend/polls/delete | voyager.polls.delete | \VoyagerPolls\Http\Controllers\PollsController@delete | web,admin.user | | | POST | backend/polls/edit | voyager.polls.edit.post | \VoyagerPolls\Http\Controllers\PollsController@edit_post | web,admin.user | | | GET|HEAD | backend/polls/{id} | voyager.polls.read | \VoyagerPolls\Http\Controllers\PollsController@read | web,admin.user | | | GET|HEAD | backend/polls/{id}/edit | voyager.polls.edit | \VoyagerPolls\Http\Controllers\PollsController@edit | web,admin.user | | | POST | backend/posts | voyager.posts.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/posts | voyager.posts.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | GET|HEAD | backend/posts/create | voyager.posts.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | PUT|PATCH | backend/posts/{post} | voyager.posts.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | DELETE | backend/posts/{post} | voyager.posts.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | GET|HEAD | backend/posts/{post} | voyager.posts.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | GET|HEAD | backend/posts/{post}/edit | voyager.posts.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | POST | backend/products | voyager.products.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/products | voyager.products.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | GET|HEAD | backend/products/create | voyager.products.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | PUT|PATCH | backend/products/{product} | voyager.products.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | GET|HEAD | backend/products/{product} | voyager.products.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | DELETE | backend/products/{product} | voyager.products.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | GET|HEAD | backend/products/{product}/edit | voyager.products.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | GET|HEAD | backend/profile | voyager.profile | \TCG\Voyager\Http\Controllers\VoyagerController@profile | web,admin.user | | | POST | backend/roles | voyager.roles.store | \TCG\Voyager\Http\Controllers\VoyagerRoleController@store | web,admin.user | | | GET|HEAD | backend/roles | voyager.roles.index | \TCG\Voyager\Http\Controllers\VoyagerRoleController@index | web,admin.user | | | GET|HEAD | backend/roles/create | voyager.roles.create | \TCG\Voyager\Http\Controllers\VoyagerRoleController@create | web,admin.user | | | PUT|PATCH | backend/roles/{role} | voyager.roles.update | \TCG\Voyager\Http\Controllers\VoyagerRoleController@update | web,admin.user | | | GET|HEAD | backend/roles/{role} | voyager.roles.show | \TCG\Voyager\Http\Controllers\VoyagerRoleController@show | web,admin.user | | | DELETE | backend/roles/{role} | voyager.roles.destroy | \TCG\Voyager\Http\Controllers\VoyagerRoleController@destroy | web,admin.user | | | GET|HEAD | backend/roles/{role}/edit | voyager.roles.edit | \TCG\Voyager\Http\Controllers\VoyagerRoleController@edit | web,admin.user | | | POST | backend/settings | voyager.settings.store | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@store | web,admin.user | | | PUT | backend/settings | voyager.settings.update | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@update | web,admin.user | | | GET|HEAD | backend/settings | voyager.settings.index | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@index | web,admin.user | | | DELETE | backend/settings/{id} | voyager.settings.delete | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@delete | web,admin.user | | | GET|HEAD | backend/settings/{id}/delete_value | voyager.settings.delete_value | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@delete_value | web,admin.user | | | GET|HEAD | backend/settings/{id}/move_down | voyager.settings.move_down | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@move_down | web,admin.user | | | GET|HEAD | backend/settings/{id}/move_up | voyager.settings.move_up | \TCG\Voyager\Http\Controllers\VoyagerSettingsController@move_up | web,admin.user | | | GET|HEAD | backend/test | voyager. | Closure | web,admin.user | | | GET|HEAD | backend/test-with-login | voyager.test | Closure | web,admin.user | | | POST | backend/upload | voyager.upload | \TCG\Voyager\Http\Controllers\VoyagerController@upload | web,admin.user | | | GET|HEAD | backend/users | voyager.users.index | \TCG\Voyager\Http\Controllers\VoyagerBreadController@index | web,admin.user | | | POST | backend/users | voyager.users.store | \TCG\Voyager\Http\Controllers\VoyagerBreadController@store | web,admin.user | | | GET|HEAD | backend/users/create | voyager.users.create | \TCG\Voyager\Http\Controllers\VoyagerBreadController@create | web,admin.user | | | DELETE | backend/users/{user} | voyager.users.destroy | \TCG\Voyager\Http\Controllers\VoyagerBreadController@destroy | web,admin.user | | | PUT|PATCH | backend/users/{user} | voyager.users.update | \TCG\Voyager\Http\Controllers\VoyagerBreadController@update | web,admin.user | | | GET|HEAD | backend/users/{user} | voyager.users.show | \TCG\Voyager\Http\Controllers\VoyagerBreadController@show | web,admin.user | | | GET|HEAD | backend/users/{user}/edit | voyager.users.edit | \TCG\Voyager\Http\Controllers\VoyagerBreadController@edit | web,admin.user | | | GET|HEAD | pages | | Closure | web | | | POST | polls/api/vote/{id} | polls.vote | \VoyagerPolls\Http\Controllers\PollsController@api_vote | | | | GET|HEAD | polls/api/{slug}.json | polls.json | \VoyagerPolls\Http\Controllers\PollsController@json | | | | GET|HEAD | test | | Closure | | +--------+-----------+-------------------------------------------------+--------------------------------------------+----------------------------------------------------------------------------+----------------+

christianirack commented 6 years ago

I had the same problem with Voyager. Thus could resolve it: Generate custom view (navbar.blade.php);

$breadcrumb_url = str_replace(env('APP_URL'), env('APP_URL').'/admin',$breadcrumb_url);

bradapeter commented 6 years ago

thanks, I will try it later

fletch3555 commented 6 years ago

This should be fixed in v1.0.10. Issue was caused by #2307. We missed it while testing.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.