-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Create a Permalinkable interface used by the relevant models so a model instance can be passed to the UrlGenerator E.g.
$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:
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request