Open kirubidavid opened 8 years ago
Are you using Laravel 4 or 5+?
Laravel 4
You should be able to pass an Eloquent collection to the addEvents()
method (note the plural).
I 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.
I can pass Eloquent collection to the addEvents() method, but how do I pass uniqe url for each event? I can only pass a single url for the whole collection.
as I can print the calendar with all months?
Hi, Is it possible to get multiple events from a database?
I have tried:
$eloquentEvent = EventModel::where('status','=','Approved')->get();
$calendar = Calendar::addEvents($events)->addEvent($eloquentEvent, ['color' => '#800', ]);
I Get an error
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
I would also like to assign multiple colors for different events.