Skip to content

Commit 2411f46

Browse files
committed
clarify that Icon::register() should go in the service providers boot method
1 parent 2863b16 commit 2411f46

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

content/collections/pages/5-to-6.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ If you are using any `icon` fieldtypes with the `directory` option, you will nee
282282
```php
283283
// AppServiceProvider.php
284284
use Statamic\Facades\Icon; // [tl! ++]
285-
Icon::register('heroicons', base_path('resources/heroicons')); // [tl! ++]
285+
286+
public function boot(): void
287+
{
288+
Icon::register('heroicons', base_path('resources/heroicons')); // [tl! ++]
289+
}
286290
```
287291

288292
```yaml

0 commit comments

Comments
 (0)