You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using your project laravel-mongodb. It is very helpful for me.
However, I have some problem when using laravel-mongodb.
How I create a collection with custom field when insert -> like:
{
'_id' : AUTO_INCREMENT
'username' : unique (phuocduy1988)
'view_count' : interger 64 bit ()
'average' : double
}
How to make index for username
Please give me more example how to using:
$client = DB::getMongoClient();
$db = DB::getMongoDB();
I cannot using DB in laravel Controller
$client = DB::collection('spot')->where('name', 'John')->get();
I got an error:
Call to undefined method Illuminate\Database\MySqlConnection::collection();
Please help me!
The text was updated successfully, but these errors were encountered:
I am using your project laravel-mongodb. It is very helpful for me.
However, I have some problem when using laravel-mongodb.
How I create a collection with custom field when insert -> like:
{
'_id' : AUTO_INCREMENT
'username' : unique (phuocduy1988)
'view_count' : interger 64 bit ()
'average' : double
}
How to make index for username
Please give me more example how to using:
$client = DB::getMongoClient();
$db = DB::getMongoDB();
I cannot using DB in laravel Controller
$client = DB::collection('spot')->where('name', 'John')->get();
I got an error:
Call to undefined method Illuminate\Database\MySqlConnection::collection();
Please help me!
The text was updated successfully, but these errors were encountered: