Download the PHP package paulofelipem/brazilian-regions without Composer

On this page you can find all versions of the php package paulofelipem/brazilian-regions. 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 brazilian-regions

Brazilian Regions for Laravel

Latest Version on Packagist Total Downloads

A Laravel package that provides migrations, seeders, and Eloquent models for countries, states, and cities — with full data for all Brazilian states and municipalities.

Data sourced from the IBGE Localities API.

Features

Requirements

Installation

Install the package via Composer:

The service provider is registered automatically. If needed, you can register it manually in config/app.php:

Publish the configuration and migration files:

Note: This publishes a config/brazilianregions.php file. If you already have a file with that name, rename or remove it before publishing.

Usage

Run the migrations and seeders to create and populate the tables:

Then use the provided Eloquent models in your application:

Database Schema

countries

Column Description
id Auto-increment primary key
m_49 UN M49 numeric code
acronym ISO Alpha-3 country code
name Country name
region Geographic region

states

Column Description
id Auto-increment primary key
acronym State abbreviation (e.g. SP, RJ)
name State name
region Region name (e.g. Sudeste)
region_acronym Region abbreviation
country_id Foreign key to countries

cities

Column Description
id Auto-increment primary key
name City name
state_id Foreign key to states

All foreign keys use CASCADE on delete.

Configuration

The published config/brazilianregions.php file allows you to customize:

This is useful when you need to integrate with an existing database schema or extend the default models.

Changelog

See CHANGELOG for release history.

Bugs

If you find any issues, please open an issue on GitHub.

Credits

License

The MIT License (MIT). See LICENSE for more information.


All versions of brazilian-regions with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/database Version >=9.40
illuminate/support Version >=9.40
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 paulofelipem/brazilian-regions contains the following files

Loading the files please wait ...