Skip to content

Commit 3621ef1

Browse files
committed
readme
1 parent 3d47290 commit 3621ef1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ return [
158158
| @see https://schema.org/WebPage for all available properties
159159
|
160160
*/
161-
'defaults' => [],
161+
'webpage' => [],
162162
],
163163

164164
];
@@ -207,7 +207,9 @@ This will render all the default tags:
207207

208208
#### From a Controller
209209

210-
Most of the time, your will want to define you seo tags from a controller
210+
Most of the time, your will want to define you seo tags from a controller.
211+
Calling the `seo()` helper will return the current `SeoManager` instance.
212+
This instance is available anywhere in your app through the service container.
211213

212214
```php
213215
namespace App\Http\Controllers;
@@ -219,9 +221,9 @@ class HomeController extends Controller
219221
function __invoke()
220222
{
221223
return view('home', [
222-
'seo' => SeoManager::default(
223-
title: "Homepage",
224-
)
224+
'seo' => seo()
225+
->setTitle("Homepage")
226+
->setDescription("The homepage description"),
225227
]);
226228
}
227229
}
@@ -231,7 +233,7 @@ Then, in your view, call `seo`:
231233

232234
```php
233235
<head>
234-
{!! seo($seo) !!}
236+
{!! $seo !!}
235237
</head>
236238
```
237239

@@ -274,7 +276,7 @@ Then, just echo it in your view:
274276

275277
```php
276278
<head>
277-
{!! seo($seo) !!}
279+
{!! $seo !!}
278280
</head>
279281
```
280282

0 commit comments

Comments
 (0)