PHP code example of devadamlar / laravel-id3global

1. Go to this page and download the library: Download devadamlar/laravel-id3global 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/ */

    

devadamlar / laravel-id3global example snippets


use DevAdamlar\LaravelId3global\Verifiable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;

class User extends Model
{
    use Verifiable;
    
    protected array $globalInputData = [
        'Personal.PersonalDetails.Gender' => 'sex',
        'ContactDetails.MobileTelephone.Number' => 'contact.mobile',
    ];
    
    public function contact(): HasOne
    {
        return $this->hasOne(Contact::class);
    }
}

class Contact extends Model
{

}

$user = User::find(1);
$user->makeInputData([
    'ContactDetails.MobileTelephone.Number' => '+994502000000'
]);