1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 01:44:03 +00:00

more examples

This commit is contained in:
Samuel Štancl 2021-05-24 19:15:16 +02:00 committed by GitHub
parent 9cebfec4c8
commit c7ac9a4d33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.