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

[Bug] No more links? Maybe? #28

Open
tabacitu opened this issue Aug 31, 2023 · 2 comments
Open

[Bug] No more links? Maybe? #28

tabacitu opened this issue Aug 31, 2023 · 2 comments

Comments

@tabacitu
Copy link
Member

In my tests, the column links don't work 80% of the times... what do you say we remove them? 👀

I mean... the way we generate the links is unreliable... we just get the table name, create a route from it and HOPE that links exists. We will be pointing to entries who don't have CRUDs, I'm sure of it. It just depends on the project if it's 10%, 20% or 80%.

So the question is... is it better to point to broken links... or not point at all? 🤷‍♂️

@tabacitu
Copy link
Member Author

Of course... it'd be best if we could generate reliable links 😅

And for that... we could instruct people to add a new method to their ActivityLog trait:

public function getAdminPageUrl() {
    return url(route(Str::of($entry->getTable())->singular().".show", ['id' => $this->getKey()]));
}

Then they can override that method in each model, if needed.


BUUT. It would still be unreliable. Because the correct place to get that information is the CrudController... where the dev has defined things in their setup().


Bleah nevermind 🫠 Problem for future-us.

@promatik
Copy link
Contributor

promatik commented Sep 1, 2023

I agree with allowing users to set a method in the model, but, we keep the default on our side. So it's like an override 🤷‍♂️

@tabacitu tabacitu changed the title [Bug] No more links [Bug] No more links? Maybe? Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants