here i have a Media class at Spatie\MediaLibrary\Models\Media path. it was creating PDO issues with this code.
class Media extends Model implements Responsable, Htmlable
so i tried this in there and it worked for the cause.
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
class Media extends Eloquent implements Responsable, Htmlable
now its fine as long its working but what about updating composer will remove everything i guess and PDO problem will appear again. so how can i publish it out there to make it permanent?