Skip to content

Commit e91c639

Browse files
committed
Update README.md
1 parent 2bb3b15 commit e91c639

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,14 +659,21 @@ class CustomMetric extends Model
659659
}
660660
```
661661

662-
Once you have created your custom model, you may set it as the default using the `useModel()` method on the `DatabaseMetricManager`:
662+
Once you have created your custom model, you may set it as the default using the `useModel()` method on the `DatabaseMetricManager`.
663+
664+
This is typically done in your `AppServiceProvider`:
663665

664666
```php
665667
use App\Models\CustomMetric;
666668
use DirectoryTree\Metrics\DatabaseMetricManager;
667669

668-
// In your AppServiceProvider boot method
669-
DatabaseMetricManager::useModel(CustomMetric::class);
670+
/**
671+
* Bootstrap any application services.
672+
*/
673+
public function boot(): void
674+
{
675+
DatabaseMetricManager::useModel(CustomMetric::class);
676+
}
670677
```
671678

672679
#### Per-Metric Custom Model

0 commit comments

Comments
 (0)