Crud: The config 'route_prefix' is ignored on some cases.

Created on 22 Sep 2016  路  2Comments  路  Source: Laravel-Backpack/CRUD

I'm trying to change the prefix from
'route_prefix' => 'admin',
to
'route_prefix' => 'nf/admin',

This option is ignored on some cases, like

  • Link to go back to the list
  • Second element of the breadcrumb, but not the first.
  • Every link to an url related with Auth, like login or logout, but the actual url changes, for example, the logout link on the top right is /admin/logout, but the actual url, changed by the prefix is nf/admin/logout.
Bug help wanted

Most helpful comment

Just fixed the auth routes, you should:

  1. run composer update to get Base 0.7.2;
  2. delete your /resources/vendor/backpack/base folder;
  3. run php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" --tag="views" to get the new files;

All 2 comments

Hi @Alexgmin ,

You're totally right, I now see the issue, it's somehow connected to @twoSeats's great initiative to make the route_prefix work cross-package. From what you've reported, I've pinned them down to the fact that:

  • all CrudControllers from the packages register the route as admin/smth, and this is used to generate the links in a lot of places;
  • the views in Base also need to respect that prefix (for the Auth routes you mentioned);

Both I and @twoSeats are working on it, will be fixed shortly. Let's leave this issue open until then, please.

Cheers!

Just fixed the auth routes, you should:

  1. run composer update to get Base 0.7.2;
  2. delete your /resources/vendor/backpack/base folder;
  3. run php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" --tag="views" to get the new files;
Was this page helpful?
0 / 5 - 0 ratings