Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
How to add extra field value to the full calendar JS plugin in Laravel 8

Controller Function to get values from DB

public function index(Request $request)
{
    $getEvents2 = DB::table("appointments_tbl")
        ->join("patients_tbl", function($join){
            $join->on("appointments_tbl.patient_id", "=", "patients_tbl.id");
            })
        ->select("appointments_tbl.start_time","appointments_tbl.end_time", "patients_tbl.status", "patients_tbl.first_name")
        ->get();
        
    $events = [];

    foreach ($getEvents2 as $values) {
        $event = [];
        $event['title'] = $values->first_name;
        $event['status'] = $values->status;
        $event['start'] = $values->start_time;
        $event['end'] = $values->end_time;
        $events[] = $event;
    }

    return $events;
}

In the FullCalendar Initialization function, added the function to append the status field value.

events: 'getEvents',
            eventDidMount: function(event) {
                $('.fc-event-time').append("<br/>" + event.status);
            },

Output is undefined enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Here is the answer

            events: 'getEvents',
            eventDidMount: function(info) {
                var statusText = info.event.extendedProps.status;
                $(info.el).find('.fc-event-time').append("<br/>" + statusText);
            },

Thank you so much for the help!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!