laravel-world icon indicating copy to clipboard operation
laravel-world copied to clipboard

Mongodb support

Open doubleprincez opened this issue 4 years ago • 2 comments

I tried using this package with my mongodb project but got stuck in the seeding phase. This is the result i got from running php artisan world:init migrations error

Recreate: create a new project, add Jenssegers Laravel Mongodb to the project and configure it as the default database for the project. Install khsing Laravel World package and follow the installation steps.

Previous Debug Steps: I tried changing all migrations and seed to implement the specified mongodb alternatives in the root folder of khsing package in vendor but still unable to fix it but get this error:

Symfony\Component\Debug\Exception\FatalThrowableError
Call to a member function prepare() on null

doubleprincez avatar May 07 '20 19:05 doubleprincez

This is perharps because mongodb doesn't support the sql snytax. Look he is trying to disable/enable before and after seeding the data. What you can do is check if the DB connection is SQLiteConnection, MySqlConnection or PostgresConnection or "MongoDB.." then perform the statement. However, I'am not versed with mongodb so you might have to look for a way to disable constraints there. Hope it helps

muarachmann avatar Aug 26 '20 10:08 muarachmann

@doubleprincez I have not test in MongoDB. I am planing to remove relation database dependent. That may helps you.

khsing avatar Mar 07 '21 08:03 khsing