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:
parent
9cebfec4c8
commit
c7ac9a4d33
1 changed files with 18 additions and 1 deletions
19
README.md
19
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue