Okay, so I created 3 tables in the database.
The first table has hourly intervals that are every 10 minutes in a day and a table shows where you can get tickets.
My question is, how can I make that day or somehow create a calendar that has those intervals and if an interval was selected by a user it should not be used on that date
?
For example, I have today and the 8:10 interval, I took that interval and I would like to save somewhere and know if I could do that.
public function up()
{
Schema::create('ticket_office', function (Blueprint $table) {
$table->id();
$table->string('ticket_office')->nullable(); // ca be ticket_office_1, ticket_office_2 max 6
$table->string('type')->nullable(); // horror etc
$table->timestamps();
});
}
public function up()
{
Schema::create('intervals', function (Blueprint $table) {
$table->id();
$table->string('intervals')->null(); //can be 8:10, 8:20 to 16:50
$table->timestamps();
});
}
My question is
Create a new table with retrieved intervals and save today's date + that day's interval? I mention that I want to have 6 ticket rooms.
How should I proceed to be able to take over the interval and today's date, to save them in the fixed database with that interval?
Is such a thing possible?
As in this case I could put a condition.