duandingqi9442 2013-04-08 08:28
浏览 72
已采纳

php laravel中的数组到字符串转换错误

I am creating an event based website. I am using laravel for this with backbone. I am retrieving data from database using backbonejs with laravel as following

var events = new Events();
new EventsView({el: $("#calendar"), collection: events}).render();
events.fetch();

On the server side I have following controller

class Calendars_Controller extends Base_Controller {

public $restful = true;

public function get_index()
{
    //print_r(Calendar::all() );
    return Calendar::all();
}

}

But this returns following error

Unhandled Exception

Message:

Array to string conversion
Location:

/Applications/MAMP/htdocs/calendar/laravel/response.php on line 272

How can I solve this issue?

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 如何修改为正确的?求解决
      • ¥15 django访问管理员界面问题
      • ¥20 python homework完成
      • ¥20 求解 多变量系统的最小二乘辨识问题的推导以及matlab仿真
      • ¥15 arduino esp8266 Blinker编译报问题
      • ¥15 ubuntu18.04运行模型,直接死机
      • ¥30 (问卷调查)莫名其妙丢了u盘,你们会是什么心理状态
      • ¥100 Spark+android应⽤案例
      • ¥15 yolov8 目标检测 重叠 遮挡
      • ¥20 微信聊天记录如何部署到服务器上