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

227
Views
Pull data from database with Laravel and send to Fullcalendar

this is my first time working with the full calendar and laravel combined and I have an issue pulling data from the database and proceeding it to the full calendar.

I have a show page for each service and I need to calculate working hours based on the returned data from the database (work_to - work_from).

This is how I got the access to the model in the script:

const service = window.service;

When I log some data it looks like this:

SCRIPT

const service = window.service;
for(let i = 0; i < service.services_work_time.length; i++) {
     console.log(service.services_work_time[i].work_to)
}

Display of the services data

enter image description here

Display of the services.services_time_to_work relation enter image description here

  • How can I take this data, do some math operations with it and return it to the newly created DOM element?
about 4 years ago · Juan Pablo Isaza
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!