New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

brokeyourbike/country-casts-laravel

Cast Laravel country code attributes from ISO3 to ISO2
1,063
Install
composer require brokeyourbike/country-casts-laravel
Latest Version:0.1.2
PHP:^8.0
Laravel:8 · 9
License:MPL-2.0
Last Updated:May 20, 2023
Links: GitHub  ·  Packagist
Maintainer: brokeyourbike

country-casts-laravel

Latest Stable Version Total Downloads Maintainability Test Coverage

Cast country code attributes from ISO3 to ISO2

Installation

composer require brokeyourbike/country-casts-laravel

Usage

use Illuminate\Database\Eloquent\Model;
use BrokeYourBike\CountryCasts\Alpha2Cast;

class Order extends Model
{
    protected $casts = [
        'country_code' => 'string',
        'country_code_alpha2' => Alpha2Cast::class . ':country_code',
    ];
}

Authors

License

Mozilla Public License v2.0

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

651,963,193 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

518,004,183 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

435,097,283 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

407,699,310 4,663

Version History

Version Released PHP Laravel License
0.1.2 ^8.0 ^8|^9 MPL-2.0
0.1.1 ^8.0 ^8|^9 MPL-2.0
0.1.0 ^8.0 ^8 MPL-2.0