PHPackages                             futuraddb/twill-geo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. futuraddb/twill-geo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

futuraddb/twill-geo
===================

This package allows you to easily manage Geo Structured Data (JSON-LD) for your Twill models.

v1.0.3(1mo ago)06MITPHPPHP ^8.1

Since Jan 13Pushed 1mo agoCompare

[ Source](https://github.com/futuraddb/twill-geo)[ Packagist](https://packagist.org/packages/futuraddb/twill-geo)[ Docs](https://futura.si)[ RSS](/packages/futuraddb-twill-geo/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Twill Geo Package
=================

[](#twill-geo-package)

This package allows you to easily manage Geo Structured Data (JSON-LD) for your Twill models.

It works by adding a temporary field to your Twill form, which is then captured and saved into its own dedicated database table. This keeps your main model's table clean while still providing a seamless editing experience.

Key features:

- **Custom Twill Form fieldset**: ready-to-use fieldset that includes a custom form field that allows for both manual entry and AI-powered generation of geo-structured data.
- **Frontend Component**: Includes a ready-to-use Blade component for outputting the saved data as JSON-LD in your frontend templates.

Requirements
------------

[](#requirements)

- **PHP**: `^8.1`
- **Laravel (Illuminate/Support)**: `^10.0`
- **Twill**: `^3.0`

Installation
------------

[](#installation)

### 1. Install package

[](#1-install-package)

```
composer require futuraddb/twill-geo
```

### 2. Publish Assets and Config

[](#2-publish-assets-and-config)

To use the package, you need to publish the assets:

```
php artisan vendor:publish --tag=twill-geo-assets
```

Optionally, you can also publish the configuration file:

```
php artisan vendor:publish --tag=twill-geo-config
```

### 3. Update Twill Assets

[](#3-update-twill-assets)

After publishing the assets, you need to rebuild Twill's assets:

```
php artisan twill:build
```

### 4. Run Migrations

[](#4-run-migrations)

The package includes a migration for the `geo_structured_data` table. If you declined running migrations during the `twill:build` step, run the migrations manually:

```
php artisan migrate
```

Setup
-----

[](#setup)

### 1. Configure env variables

[](#1-configure-env-variables)

Set the `TWILL_GEO_OPENAI_API_KEY` env variable. Optionally you can also set `TWILL_GEO_LLM_MODEL`.

### 2. Configure the Model

[](#2-configure-the-model)

Add the `HasGeoStructuredData` trait to your Twill model:

```
use futuraddb\TwillGeo\Repositories\Behaviors\HasGeoStructuredData;
use A17\Twill\Models\Model;

class Project extends Model
{
    use HasGeoStructuredData;

    // Optionally override the field name used in Twill's form
    public static function getTwillModelFieldNameForGeoStructuredData(): string
    {
        return 'custom_geo_field_name';
    }
}
```

### 3. Configure the Repository

[](#3-configure-the-repository)

Add the `HandleGeoStructuredData` trait to your Twill repository:

```
use futuraddb\TwillGeo\Repositories\Behaviors\HandleGeoStructuredData;

class ProjectRepository extends ModuleRepository
{
    use HandleGeoStructuredData;
}
```

### 4. Configure the Controller

[](#4-configure-the-controller)

Add the Geo fieldset to your Twill controller's `getForm` method:

```
use futuraddb\TwillGeo\Helpers\GeoFormFieldset;

public function getForm(TwillModelContract $model): Form
{
    return parent::getForm($model)
        // ... other fieldsets
        ->addFieldset(GeoFormFieldset::getFieldset(translated: true));
}
```

The `getFieldset` method accepts two optional arguments:

- `bool $translated` (default: `false`): Whether the field should be translatable.
- `string $fieldLabel` (default: `'GEO'`): The label for the fieldset.

Usage
-----

[](#usage)

### Displaying Structured Data in Frontend

[](#displaying-structured-data-in-frontend)

To output the structured data in your layout, use the provided Blade component:

```

```

This component will automatically retrieve the geo-structured data from the given item and output it as a `` tag.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance93

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Total

4

Last Release

34d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00bdb7a89cc13abdc34ba9db0264580dcbc0f470e89fa02146119eab897b5427?d=identicon)[jandol5](/maintainers/jandol5)

### Embed Badge

![Health badge](/badges/futuraddb-twill-geo/health.svg)

```
[![Health](https://phpackages.com/badges/futuraddb-twill-geo/health.svg)](https://phpackages.com/packages/futuraddb-twill-geo)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M264](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M984](/packages/illuminate-pagination)[illuminate/redis

The Illuminate Redis package.

8314.4M356](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
