We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Create a Permalinkable interface used by the relevant models so a model instance can be passed to the UrlGenerator E.g.
Permalinkable
UrlGenerator
$post = Post::find(1); echo url($post);
This can be useful to quickly get a list of links:
$postLinks = Post::limit(10)->get()->map('url');
Each model type has a different implementation, so the permalink() method would create a standard API for:
permalink()
get_permalink()
get_author_posts_url()
get_term_link()
It would also be possible to call the permalink() method directly, but the interface would make it type checkable.
The text was updated successfully, but these errors were encountered:
BenRutlandWeb
No branches or pull requests
Create a
Permalinkable
interface used by the relevant models so a model instance can be passed to theUrlGenerator
E.g.This can be useful to quickly get a list of links:
Each model type has a different implementation, so the
permalink()
method would create a standard API for:get_permalink()
get_author_posts_url()
get_term_link()
It would also be possible to call the
permalink()
method directly, but the interface would make it type checkable.The text was updated successfully, but these errors were encountered: