maxymajzr Advice about making app concurrency-safe
right now, i can tell you that your code is not concurrency-safe (meaning multiple-inserts at once)
there's only 1 proper way to do it, and sadly - you will never find it anywhere in any laravel or php tutorials and it's because this issue is related to data modelling and databases
instead of doing this check in PHP, you'd make your database allow or disallow inserts. it's done by placing unique keys to start, end and active columns in your table.
if an active tour exists for a combination of start and end, database will throw an error saying that it can't write because unique key constraint fails. this is concurrency-safe and no record can exist with the same combination of data
what i'm typing heavily depends on your table schema, i didn't include all keys you'd have to add to unique constraint, however that's the way you do it, you'd have to think a bit before applying the solution