Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/237.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 来自数据库的数据作为Json发送的fullcalendar事件_Php_Json_Laravel_Fullcalendar - Fatal编程技术网

Php 来自数据库的数据作为Json发送的fullcalendar事件

Php 来自数据库的数据作为Json发送的fullcalendar事件,php,json,laravel,fullcalendar,Php,Json,Laravel,Fullcalendar,我的控制器中有一个函数,用于生成从数据库生成的fullcalendar事件,该数据库以以下格式返回json: [{"allDay":"","id":17,"title":"Illness","start":"2015-06-05","end":"2015-06-05"} ,{"allDay":"","id":18,"title":"Illness","start":"2015-05-05","end":"2015-05-05"}] 当我转到http://localhost/mysite/pub

我的控制器中有一个函数,用于生成从数据库生成的fullcalendar事件,该数据库以以下格式返回json:

[{"allDay":"","id":17,"title":"Illness","start":"2015-06-05","end":"2015-06-05"}
,{"allDay":"","id":18,"title":"Illness","start":"2015-05-05","end":"2015-05-05"}]
当我转到
http://localhost/mysite/public/getlogs
但当我尝试通过以下操作创建事件时:

$('#calendar').fullCalendar({
            //calendar options here              
                    events: 'getLogs'});
生成的get请求如下:

http://localhost/mysite/public/getLogs?start=2015-04-26&end=2015-06-07&_=1431949457792
我的日程表上没有新的活动,有人能告诉我我做错了什么吗?我是否需要将开始和结束参数添加到生成json的端点

我使用的是laravel,所以我的路线是“getLogs”,我可能需要在那里添加参数,但我不确定,老实说,我在php或web开发方面没有太多经验

编辑: 我已经在我的routes.php中尝试过了,但没有成功:

Route::get('getlogs/{start}/{end}/{_}','CalendarController@getLogs');

看来我是个白痴:

$('#calendar').fullCalendar({
            //calendar options here              
                    events: 'getLogs'});
应该是:

$('#calendar').fullCalendar({
            //calendar options here              
                    events: 'getlogs'});

对于那些花5分钟看屏幕想知道有什么不同的人:事件的小写字母
L