Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

219
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda