---
title: "Venue location — Appointments for Laravel | Roundly"
description: "Give appointments a venue name and coordinates, measure distance and find appointments within a radius."
url: https://roundly-consulting.com/open-source/docs/appointments-for-laravel/venue-location
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Appointments for Laravel](https://roundly-consulting.com/open-source/docs/appointments-for-laravel.md)

# Venue location

Venue support comes from geolocation-for-laravel, wired into the bundled model: a location column for the venue name, plus latitude and longitude exposed as a Coordinates value object:

```php
use RoundlyConsulting\Appointments\Facades\Appointments;
use RoundlyConsulting\Appointments\Models\Appointment;
use RoundlyConsulting\Geolocation\DataTransferObjects\Coordinates;

$appointment = Appointments::schedule('Clinic visit')
    ->startingAt('2026-07-01 09:00')
    ->located(51.5074, -0.1278, 'Clinic A')   // latitude, longitude, venue name
    ->create();

$appointment->coordinates;                     // Coordinates value object (or null)
$appointment->location;                        // 'Clinic A'
$appointment->distanceFrom(new Coordinates(48.8566, 2.3522)); // kilometres, or null

Appointment::query()->withinRadius(new Coordinates(51.5074, -0.1278), 10)->get();
```

## Setting the venue

- located($latitude, $longitude, ?$venue) — coordinates and an optional venue name.
- at(Coordinates $coordinates) — coordinates from a value object.
- venue(string $location) — the venue name only.

```php
Appointments::schedule('Team offsite')
    ->startingAt('2026-09-10 10:00')
    ->at(new Coordinates(48.1486, 17.1077))    // coordinates only
    ->venue('Riverside meeting hall')          // venue name only
    ->create();
```

## Radius search

withinRadius() keeps appointments inside the bounding box of the radius (in kilometres) — a cheap pre-filter on the indexed latitude and longitude columns. For an exact cut-off, refine the results with distanceFrom(), which returns the great-circle distance in kilometres, or null for an appointment without coordinates:

```php
$clinic = new Coordinates(48.1486, 17.1077);

$nearby = Appointment::query()
    ->withinRadius($clinic, 5)                  // bounding-box pre-filter, kilometres
    ->upcoming()
    ->get()
    ->filter(fn (Appointment $appointment) => $appointment->distanceFrom($clinic) <= 5);
```

The ICS export uses the location column (falling back to meta.location) and adds a GEO line when coordinates are set.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/appointments-for-laravel.md)
