From c7ac9a4d338d5bedd9b138a89468e569287491dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 24 May 2021 19:15:16 +0200 Subject: [PATCH] more examples --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dd6da8..8af4f80 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# laravel-seo +# Laravel SEO This is a simple and extensible package for improving SEO via meta tags, such as OpenGraph tags. @@ -208,6 +208,23 @@ seo()->extension('facebook', false); ## Examples +### Service Provider + +This example sets the default state in a service provider's `boot()` method: + +```php +seo() + ->site('ArchTech — Meticulously architected web applications') + ->title( + default: 'ArchTech — Meticulously architected web applications', + modify: fn (string $title) => $title . ' | ArchTech' + ) + ->description(default: 'We are a development agency ...') + ->image(default: fn () => asset('header.png')) + ->flipp('blog', 'o1vhcg5npgfu') + ->twitterSite('archtechx'); +``` + ### Controller This example configures SEO metadata from a controller.