Skip to content

Commit

Permalink
Merge pull request corcel#419 from corcel/fix-docs-taxonomy
Browse files Browse the repository at this point in the history
Fix typo in taxonomy doc section
  • Loading branch information
jgrossi authored Oct 27, 2018
2 parents 10dd45d + 4681973 commit 905b7ed
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 @@ -507,7 +507,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 @@ -517,7 +517,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 905b7ed

Please sign in to comment.