Hello, thank you for this package, really useful! I wonder if you are willing to support eloquent scopes to perform similar results? My use case would be to check if a booking is overlapping a given period.
return new class extends Migration
{
public function up(): void
{
Schema::create("bookings", function (Blueprint $table) {
$table->id();
$table->dateTime("starts_at");
$table->dateTime("ends_at");
$table->timestamps();
});
}
};
use App\Models\Booking;
use Spatie\Period\Period;
$period = Period::make("2024-01-24 10:00:00", "2024-01-24 19:00:00");
$bookings = Booking::overlapping($period)->get();
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
Hello, thank you for this package, really useful! I wonder if you are willing to support eloquent scopes to perform similar results? My use case would be to check if a booking is overlapping a given period.