kirschbaum-development / nova-comments

A commenting tool for Laravel Nova
MIT License
33 stars 37 forks source link

Link to commenter should follow nova path, but always goes to /nova #20

Open davidraijmakers opened 4 years ago

davidraijmakers commented 4 years ago

In the nova config you can set the path for nova itself:

`/* -------------------------------------------------------------------------- Nova Path
This is the URI path where Nova will be accessible from. Feel free to
change this path to anything you like. Note that this URI will not
affect Nova's internal API routes which aren't exposed to users.
*/

'path' => '/',`

But this isn't taken into account for the following line of code, could this please be changed?

`commenterUrl() { let commenterId = _.find(this.comment.fields, { attribute: 'commenter' }).belongsToId;

            return `/nova/resources/users/${commenterId}`;
        },`
dvanscott commented 4 years ago

@davidraijmakers Thanks for letting us know about this! We'll be sure to take a look.

We're certainly open to a PR to change that behavior if you'd like to submit one.

daanadriaan commented 4 years ago

@davidraijmakers Just submitted a pull request that fixes this issue.

https://github.com/kirschbaum-development/nova-comments/pull/22

Note: It always routes to the users resource. It doesn't take into account the 1% chance that something else than the user model can comment.

professor93 commented 1 week ago

Any news with this PR @dvanscott @adammparker @brandonferens ?