{"action":"created","issue":{"url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/30","labels_url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/30/comments","events_url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/30/events","html_url":"https://github.com/maddhatter/laravel-fullcalendar/issues/30","id":118044809,"number":30,"title":"Database events","user":{"login":"kirubidavid","id":15942483,"avatar_url":"https://avatars.githubusercontent.com/u/15942483?v=3","gravatar_id":"","url":"https://api.github.com/users/kirubidavid","html_url":"https://github.com/kirubidavid","followers_url":"https://api.github.com/users/kirubidavid/followers","following_url":"https://api.github.com/users/kirubidavid/following{/other_user}","gists_url":"https://api.github.com/users/kirubidavid/gists{/gist_id}","starred_url":"https://api.github.com/users/kirubidavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirubidavid/subscriptions","organizations_url":"https://api.github.com/users/kirubidavid/orgs","repos_url":"https://api.github.com/users/kirubidavid/repos","events_url":"https://api.github.com/users/kirubidavid/events{/privacy}","received_events_url":"https://api.github.com/users/kirubidavid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/labels/laravel-4","name":"laravel-4","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-20T13:42:31Z","updated_at":"2015-11-20T14:01:21Z","closed_at":null,"body":"Hi,\r\nIs it possible to get multiple events from a database?\r\n\r\nI have tried: \r\n\r\n`$eloquentEvent = EventModel::where('status','=','Approved')->get();`\r\n\r\n`$calendar = Calendar::addEvents($events)->addEvent($eloquentEvent, ['color' => '#800', ]);`\r\n\r\nI Get an error\r\n\r\n`Argument 1 passed to MaddHatter\\LaravelFullcalendar\\Calendar::addEvent() must implement interface MaddHatter\\LaravelFullcalendar\\Event, instance of Illuminate\\Database\\Eloquent\\Collection given, called in D:\\######\\app\\controllers\\CrystalController.php on line 34 and defined` \r\n\r\n I would also like to assign multiple colors for different events.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/comments/158409743","html_url":"https://github.com/maddhatter/laravel-fullcalendar/issues/30#issuecomment-158409743","issue_url":"https://api.github.com/repos/maddhatter/laravel-fullcalendar/issues/30","id":158409743,"user":{"login":"maddhatter","id":4449339,"avatar_url":"https://avatars.githubusercontent.com/u/4449339?v=3","gravatar_id":"","url":"https://api.github.com/users/maddhatter","html_url":"https://github.com/maddhatter","followers_url":"https://api.github.com/users/maddhatter/followers","following_url":"https://api.github.com/users/maddhatter/following{/other_user}","gists_url":"https://api.github.com/users/maddhatter/gists{/gist_id}","starred_url":"https://api.github.com/users/maddhatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddhatter/subscriptions","organizations_url":"https://api.github.com/users/maddhatter/orgs","repos_url":"https://api.github.com/users/maddhatter/repos","events_url":"https://api.github.com/users/maddhatter/events{/privacy}","received_events_url":"https://api.github.com/users/maddhatter/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T14:01:21Z","updated_at":"2015-11-20T14:01:21Z","body":"You should be able to pass an Eloquent collection to the `addEvents()` method (note the plural).\r\n\r\nI made changes to allow adding any FullCalendar property (including color) to events, but I don't remember if that change was backported to the Laravel 4 branch... let me look into that."}}