Skip to content

Commit

Permalink
Update README.md (#528)
Browse files Browse the repository at this point in the history
Clarify the what the different examples are doing.
  • Loading branch information
DannyCooper authored Nov 1, 2023
1 parent eae80e3 commit a3e5c06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class Post extends Model implements Sitemapable
{
public function toSitemapTag(): Url | string | array
{
// Simple return:
return route('blog.post.show', $this);

// Return with fine-grained control:
return Url::create(route('blog.post.show', $this))
->setLastModificationDate(Carbon::create($this->updated_at))
->setChangeFrequency(Url::CHANGE_FREQUENCY_YEARLY)
Expand Down

0 comments on commit a3e5c06

Please sign in to comment.