Skip to content

Commit

Permalink
Fix typo in taxonomy doc section
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrossi committed Oct 27, 2018
1 parent a9a31c7 commit 4681973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ to achieve it.

```php
// all categories
$cat = Taxonomy::category()->slug('uncategorized')->posts()->first();
$cat = Taxonomy::category()->slug('uncategorized')->posts->first();
echo "<pre>"; print_r($cat->name); echo "</pre>";

// only all categories and posts connected with it
Expand All @@ -516,7 +516,7 @@ $cat->each(function($category) {
});

// clean and simple all posts from a category
$cat = Category::slug('uncategorized')->posts()->first();
$cat = Category::slug('uncategorized')->posts->first();
$cat->posts->each(function($post) {
echo $post->post_title;
});
Expand Down

0 comments on commit 4681973

Please sign in to comment.