Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jldev's avatar
Level 6

Auto Assign User to Time Slot

I am trying to set up a volunteer form. This for will have a date and as of right now I have a json field including "start_time", "end_time", "type", "volunteer" that repeats as many times as needed throughout the day. I would enter a date and "slots" for each time needing a volunteer which would auto grab a random unique volunteer id on submission and look like the below:

[
    "id" => 17
    "date" => "2022-08-28"
    "slot" => "[{"type": "Scoreboard", "end_time": "01:00:00", "volunteer": "2", "start_time": "01:00:00"}, {"type": "Concessions", "end_time": "01:00:00", "volunteer": "1", "start_time": "01:00:00"}] ◀"
    "created_at" => "2022-08-23 01:02:07"
    "updated_at" => "2022-08-23 01:02:07"
  ]

Is a one to many relationship possible using json?

0 likes
0 replies

Please or to participate in this conversation.