PHPackages                             craigzearfoss/addressable-trait - 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. [Database &amp; ORM](/categories/database)
4. /
5. craigzearfoss/addressable-trait

ActiveLibrary[Database &amp; ORM](/categories/database)

craigzearfoss/addressable-trait
===============================

Trait to add addressable functionality to a Laravel 5.1 eloquent model.

1.0.1(9y ago)17MIT LicensePHPPHP &gt;=5.5.9

Since Jan 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/craigzearfoss/addressable-trait)[ Packagist](https://packagist.org/packages/craigzearfoss/addressable-trait)[ RSS](/packages/craigzearfoss-addressable-trait/feed)WikiDiscussions master Synced 3w ago

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

AddressableTrait for Laravel 5
==============================

[](#addressabletrait-for-laravel-5)

This adds methods to format addresses and phone numbers to an Eloquent model in [**Laravel 5**](http://laravel.com/). It also adds geocoding functionality using [GeocoderLaravel](https://github.com/geocoder-php/GeocoderLaravel).

The AddressableTrait file is pretty simple and easy to understand so modify it to suit your needs. If you have additional functionality that you would like to see added please let me know.

Composer Install
----------------

[](#composer-install)

It can be found on [Packagist](https://packagist.org/packages/craigzeaross/addressable-model). The recommended way is through [composer](http://getcomposer.org).

Edit `composer.json` and add:

```
{
    "require": {
        "craigzearfoss/addressable-model": "dev-master"
    }
}
```

And install dependencies:

```
$ composer update
```

If you do not have [**Composer**](https://getcomposer.org) installed, run these two commands:

```
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
```

Configuration
-------------

[](#configuration)

In your model add the AddressableTrait.

```
