Closed goellner closed 12 months ago
I think the issue is that you should be extending Statamic\Eloquent\Entries\Entry
not Statamic\Entries\Entry
Changing it does not throw an error, but also doesn't do anything do the shallowAugmenation. When I override the Entry in the vendor folder it works.
found the issue, had to change the binding in the eloquent-driver.php
config file
'entries' => [
'driver' => 'eloquent',
'model' => EntryModel::class,
'entry' => CustomEntry::class,
],
Customizing the shallow augmenation https://statamic.dev/extending/augmentation#shallow-augmentation doesn't work with the elqouent driver. It throws an error when clearing the cache.
I also added
to the AppServiceProvider like stated here https://statamic.dev/extending/repositories#custom-data-classes
Here is the error message: https://share.getcloudapp.com/YEu4WWln