In that episode, Jeffrey creates the following function in the Article model:
public function path() {
return route('article.show', $this);
}
Now, this works just fine and returns the following url structure: www.mydomain.com/article/{id}
However, I would like to tweak it a bit. I want my url structure to be like this: www.mydomain.com/article/{id}/{slug}
So, what I want to know is how do I have to modify the path function in order to return this url structure - i.e., the one with both the id and the slug?