Closed Thiktak closed 7 years ago
I think part of this might be corrected in yesterday's PR #120
In this, I had removed all static references to the /admin route, and created a configuration option to prefix Voyager routes with whatever you like. Let me know if this helps.
I downloaded your fork :)
Still some issues:
But yeah ! Good job :p
Funny you should mention, I actually just found those on my own myself. My search was even more generic (searched on "admin"), so some of the leftover urls got lost in the noise. You should be good now.
Note that searching for "/admin" will yield two results:
One is a default value in the media uploader Javascript that is to be overridden by an object passed into its constructor
The other is a part of the README
Ok, thanks :) I will test. Do you want to fix assets too ? I already did it. I can request a PR to this repo or yours, if you want to include all on one package.
Yeah ! Yes, I see the javascript's one.
I think there is an issue.
If you clear your view's cache (php artisan view:clear
), you will have a Route [users.index] not defined.
. Same for posts & cie.
By default, there is no route for them.
Interesting. I'll look into that.
Though, I'm wondering how that can be triggered from a view:clear command. Those routes should all be declared as resources, so - provided the database entries under the data_types table are there - those routes should be valid.
I've run php artisan view:clear
under a fresh Homestead installation. Unfortunately, I'm not able to replicate your issue.
If you could, can you detail out how to replicate the problem either on PR #120 or in my fork? That would certainly help narrow things down.
Ok. I will restart an fresh installation. Maybe the instllation part shold make some magic :)
Issue - Route [voyager.database.store_bread] not defined.
Ah, no, you're right about that one. I didn't alias the store_bread route. New commit is ready.
Yeah ! fixed ! I think some magic happened during installation :)
BUT, yes, there is a but ...
Breadcrumbs appear to be pointing fine on my side. Do you mean the links that are generated in the menu itself?
Those come from the built-in seeder. The following commit corrects that issue, but there's a caveat:
In order for those links to be generated with the correct prefix, the config value needs to be set before running the installer. You can test this yourself by creating a fresh installation, setting the voyager.routes.prefix
config value, and then running the installation process. The links will be seeded properly then.
Otherwise, seeding the database with the wrong prefix will necessitate changing each route in each menu item.
Provided my PR is accepted, I can probably work on making this an interactive part of the installation process (ie: User is presented with a prompt to set the route prefix during the voyager:install process)
Hi,
Indeed. It's working :)
On my side, the breadcrumbs still not working.
I edited the master.blade.php view add changing line 82 : <li class="active"><a href="{{ route('voyager.dashboard') . '/..' . $breadcrumb_url }}">
I recommend moving to using a route namespace to silo all the routes related to voyager.
Also, a route prefix would be nice. I have routes from Voyager colliding with existing routes now. I see a prefix being applied in VoyagerServiceProvider.php. Is there a reason it's not in the routes.php file?
src/views/tools/database/edit-add-bread.blade.php
line 27 doesn't respect the route prefix. It's still hardcoded to /admin/
.
None of the menu_items appear to respect the voyager.routes.prefix
config param.
In my branch, it did:
It appears the author incorrectly merged another piece of functionality that affected this:
@tnylea Are you able to remediate?
Thanks @maiorano84 :) I've just merged your PR and will update the latest version within a few hours. I'll be writing more tests as well to prevent these from happening :)
Thanks.
Anytime, brotato chip. Keep up the great work! It's still a young project, but it's showing a lot of promise!
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.
Hello,
I tried to install this awersome tools in a subdirectory ... but I got some issues. Indeed, i found:
action="/admin/login"
). Maybe add names to routes or using action()/route() methods on the blade templates ?{{ asset(config('voyager.assets_path')) }}
<img src="{{ asset($user_avatar) }}" />