Open maciejstepie opened 1 year ago
Did you add a mongodb
configuration in config/databas.php
in your laravel app?
Try to extend the Ticket
Model, and alter the $connection
property.
class Ticket extends \Coderflex\LaravelTicket\Models\Ticket
{
protected $connection = 'mongodb';
//
}
Because I'm not sure, on how to add a DB connection support into the package exactly, if the above solution does not work, feel free to open a PR
, and I'll check it ASAP.
Thanks!
In the
Ticket
model isuse Illuminate\Database\Eloquent\Model
but it won't work with relations to create tickets on users. It will throw an errorCall to a member function prepare() on null
It has to beuse Jenssegers\Mongodb\Eloquent\Model
.Please add option to support mongoDB connection.