Download the PHP package maxiewright/laravel-tt-addresses without Composer

On this page you can find all versions of the php package maxiewright/laravel-tt-addresses. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-tt-addresses

Laravel Trinidad & Tobago Addresses

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A Laravel package providing Trinidad and Tobago administrative divisions and cities/towns/villages for address management. Includes all 15 administrative divisions and 500+ communities.

Features

Requirements

Installation

Install the package via Composer:

Quick Install (Recommended)

Run the install command which will guide you through the setup:

This will:

  1. Publish the configuration file
  2. Publish the migrations
  3. Optionally run the migrations

Manual Installation

If you prefer to install manually:

Seed the Data

After running migrations, seed the divisions and cities:

Or add them to your DatabaseSeeder.php:

Configuration

The configuration file is located at config/tt-addresses.php:

Usage

Basic Queries

Division Types

The package includes a DivisionType enum with the following values:

Value Label Island
RegionalCorporation Regional Corporation Trinidad
Borough Borough Trinidad
CityCorporation City Corporation Trinidad
Ward Ward Tobago

Adding Addresses to Your Models

Use the HasTrinidadAndTobagoAddress trait on any model that needs Trinidad and Tobago address fields:

Create a migration for your model:

Then use it:

Geolocation Features

The package includes coordinates for cities, enabling location-based queries:

Using with Address Models

Models using HasTrinidadAndTobagoAddress automatically get location methods:

Search Enhancements

The package includes powerful search and autocomplete features designed for high-performance applications:

Autocomplete Search

Popular Cities

Search Radius Filtering

Nearby Location Suggestions

Performance Optimization

Configuration for Search

Update your config/tt-addresses.php for search optimization:

Filament Integration

The models and enums are designed to work seamlessly with FilamentPHP.

Select Fields

Using the Enum in Filters

Administrative Divisions Reference

ID Name Type Abbreviation
1 Couva/Tabaquite/Talparo Regional Corporation CTT
2 Diego Martin Regional Corporation DMN
3 Mayaro/Rio Claro Regional Corporation MRC
4 Penal/Debe Regional Corporation PED
5 Princes Town Regional Corporation PRT
6 Sangre Grande Regional Corporation SGE
7 San Juan/Laventille Regional Corporation SJL
8 Siparia Regional Corporation SIP
9 Tunapuna/Piarco Regional Corporation TUP
10 Arima Borough ARI
11 Chaguanas Borough CHA
12 Point Fortin Borough PTF
13 Port of Spain City Corporation POS
14 San Fernando City Corporation SFO
15 Tobago Ward TOB

API Reference

Division Model

Attributes

Relationships

Scopes

Methods

Accessors

City Model

Attributes

Relationships

Scopes

Methods

Accessors

HasTrinidadAndTobagoAddress Trait

Relationships

Methods

Accessors

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Please see CONTRIBUTING for details.

Adding Missing Cities

If you notice a city/town/village is missing, please submit a pull request with:

  1. The city name (correctly spelled)
  2. The correct division_id (see Administrative Divisions Reference)

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


Made with โค๏ธ for ๐Ÿ‡น๐Ÿ‡น developers.


All versions of laravel-tt-addresses with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maxiewright/laravel-tt-addresses contains the following files

Loading the files please wait ...