I am using full calendar and php to fill it with events, I recive a form that I made a date and a start time and an end time, what I want to do is program it so that if I set as the initial time 8:00 am and end time 1:00 pm for example I do believe that 20 insert to the database, with the same information but with a difference of 15 minutes in the hour the first would be from 8 to 8:15 and the second from 8: 15 to 8:30 and so on. but I do not succeed, if it's my code
public function create_event(Request $request){
$input= $request->all();
$minutosA=15;
$segundosInicio=strtotime($input["hora_inicio"]);
$segundos_añadir=$minutosA*60;
$horaFin=date("H:i",$segundosInicio+$segundos_añadir);
$horaInicio=$input["hora_inicio"];
$input["idEspecialista"]="2";
$input["descripcion"]="este es un evento de prueba";
$input["color"]="#FD1C02";
$input["inicio"]=$input["inicio"]." ".$horaInicio;
$input["fin"]=$input["fin"]." ".$input["hora_fin"];
calendar::create($input);
return redirect()->route('calendar');
}
If someone knows how to program the cycle, it would be very helpful.