diff --git a/README.md b/README.md index 2de0665..ffefb76 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,39 @@ To disable an extension, set the second argument in the `extension()` call to fa seo()->extension('facebook', false); ``` +## Examples + +### Controller + +```php +public function show(Post $post) +{ + seo() + ->title($post->title) + ->description(Str::limit($post->content, 50)) + ->flipp('blog', ['title' => $page->title, 'content' => $page->excerpt]); + + return view('blog.show', compact($post)); +} +``` + +### View + +This example uses a Blade view that sets global SEO config using the values that are passed to the view. + +```html +@seo('title', $page->name) +@seo('description', $page->excerpt) +@seo('flipp', 'content') + +
{{ $page->excerpt }}
+ ++ {{ $page->body }} +
+``` + ## Development Run all checks locally: