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
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
- Ivan Stasiuk | Twitter | LinkedIn | stasi.uk
License
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
651,963,193
9,701
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| | MPL-2.0 | |
| 0.1.1 | ^8.0 | ^8| | MPL-2.0 | |
| 0.1.0 | ^8.0 | ^8 | MPL-2.0 |