PHP code example of sfneal / address

1. Go to this page and download the library: Download sfneal/address library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sfneal / address example snippets

 php
php artisan vendor:publish --provider="Sfneal\Address\Providers\AddressServiceProvider"
 php
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Sfneal\Address\Models\Address;


/**
 * Address relationship.
 *
 * @return MorphOne|Address
 */
public function address()
{
    return $this->morphOne(Address::class, 'addressable');
}