Route::get('/', function () {
$tweets = Tweet::all();
return view('welcome', ['tweets' => $tweets]);
});
Run Code Online (Sandbox Code Playgroud)
我正在使用mongodb制作一个laravel应用程序.
当我转到'/'时,我在mongod终端中发现错误
AssertionException handling request, closing client connection: 10304 Client Error: Remaining data too small for BSON object
Run Code Online (Sandbox Code Playgroud)
这是我的推文模型(在App\Tweet中):
namespace App;
use Jenssegers\Mongodb\Model as Eloquent;
class Tweet extends Eloquent {
protected $collection = 'tweets_collection';
}
Run Code Online (Sandbox Code Playgroud)