Fullcalendar integration using JQUERY, MySQL & PHP with repeating events support

/, MySQL, PHP/Fullcalendar integration using JQUERY, MySQL & PHP with repeating events support

Recently, I was working on a project that required populating events from a MySQL database to a Fullcalendar using PHP and JQuery.
The repeating events were set to repeat on a given frequency such as every (n) days/weeks/months/years. The client also needed a calendar that allowed completing single task in a repeating range. The following is my raw hack at tackling this problem. Any more efficient suggestions are welcome.

This solution is implemented using Laravel framework.

laravel new events-app

Migration files
php artisan make:migration CreateEventsTable --create=events

Edit the migration file

Schema::create('events', function (Blueprint $table) {
$table->string('status')->default('open'); //open, in-progress, closed, cancelled


Fullcalendar has a dow function that allows to repeat on specific days of the week. The problem is when the event is set on a date range, when you use dow, then the event repeats forever in both past and future. Fullcalendar’s end date is now exclusive and therefore I had to add 1 to the for loop the loops through the date range.

By | 2018-03-29T21:08:01+00:00 August 21st, 2017|General, MySQL, PHP|0 Comments

About the Author:

John is a co-founder and a lead developer at A&M Digital Technologies. He is a tech enthusiast who has a vast experience with server and client side web applications development. Favorite languages include PHP, JavaScript and Python. Frameworks include Laravel, CodeIgnitor, Ionic and Flask. He has also served as a Database Administrator and helicopter mechanic with the U.S. Army. In his free time, he enjoys music, travelling and site seeing. Check his fb and linked-in profile for more... Visit personal blog page | LinkedIn

Leave a Reply

%d bloggers like this: