Extending Ardent from jenssegers/laravel-mongodb

152 Views Asked by At

How do I get Ardent to extend from jenssegers/laravel-mongodb without editing the Ardent.php and replacing the use Illuminate\Database\Eloquent\Model; statement??
Any clean way to achieve this?

2

There are 2 best solutions below

2
On

You could fork the Ardent project, edit the file, then include your forked version in your composer file.

That way you retain control over the change, and it is not lost when you update or install your dependencies.

0
On

Use bmcmurray/ardent-mongodb, it's a fork of Ardent that works with jenssegers/mongodb.