insert([ [ 'ip_address' => '10.0.0.1', 'attempts' => 2, 'blocked_until' => now('UTC')->addHours(2), ], [ 'ip_address' => '10.0.0.2', 'attempts' => 2, 'blocked_until' => now('UTC')->subHours(1), ], ]); $service = app(IpBanQueryService::class); $pager = $service->paginate(['status' => 'active'], 1, 10); $this->assertSame(1, $pager->total()); $this->assertSame('10.0.0.1', $pager->items()[0]->ip_address); } }