I want to use MongoDB with Laravel 5.3. For that I have found this package:
https://github.com/jenssegers/laravel-mongodb
I have setup MongoDB on my machine and database connection with Laravel too.
I'm also able to run queries using Laravel Eloquent and Query builder.
The only issue is with authentication.
In order to use this package with Laravel, we need to extend its Eloquent class in each model like:
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
class User extends Eloquent {}
But User model provided by Laravel 5.3 already extends Authenticatable class and PHP doesn't support multiple inheritance. So, what is the solution here?
https://github.com/laravel/laravel/blob/master/app/User.php
I would prefer a solution in which User model provided by Laravel 5.3 doesn't need to be modified much.
Thanks,
Parth vora