Closed AliBahaari closed 6 years ago
Please use the search feature to find open issues #925
As a workaround to use mongodb
in laravel 5.3 you can use this
Model
use Jenssegers\Mongodb\Eloquent\Model as Moloquent;
class AdminUser extends Moloquent
{
protected $connection="mongodb";
protected $collection="admin_important_users";
}
Controller
class AdminUserController extends Controller
{
public $model;
public function __construct(AdminUser $user) {
$this->model = $user;
}
$col = $this->model->getConnection()->table('admin_important_users');
$col->get();
That's how you get collection object. I'll try some fixes but for now this works.
Thanks @lukepolo & @gp187 ..., I didn't get what should I exactly ?
Ok @lukepolo . Let's see it done. Merge please @jenssegers
Hi ..., Recently Laravel 5.3 came out. Is there any problem If I use the version for Laravel 5.2 ?