Skip to content

Commit

Permalink
Add some extra docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Mar 11, 2024
1 parent 3dc1d50 commit 4bc2438
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/advanced-usage/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To find the data classes within your application, we're using the [php-structure
```php
'structure_caching' => [
'directories' => [
'app',
app_path('Data'),
],
],
```
Expand All @@ -50,6 +50,17 @@ Structure discoverer uses reflection (enabled by default) or a PHP parser to fin
],
```

Since we cannot depend on reflection, we need to tell the parser what data objects are exactly and where to find them. This can be done by adding the laravel-data directory to the config directories:

```php
'structure_caching' => [
'directories' => [
app_path('Data'),
base_path('vendor/spatie/laravel-data/src'),
],
],
```

When using reflection discovery, the base directory and root namespace can be configured as such if you're using a non-standard directory structure or namespace

```php
Expand Down

0 comments on commit 4bc2438

Please sign in to comment.