问题描述:

I have had an issue occur multiple times within my Laravel project. Basically, I create an object using the Model::create() function. Then, when I return the model as JSON, I use Laravel's eager loading function to return the model. I use the following line(s) to return the model:

$event = Social_Event::create(array(

'creator_id' => Auth::user()->id

) + Input::all());

return Response::json(array(

'event' => $event

));

With that, I get a JSON encoded list of every existing conversation. I have never had that issue before. Does anyone see a cause for it?

相关阅读:
Top