PHP code example of wm / wm-package

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

    

wm / wm-package example snippets


    // Example:
    // protected const MODEL_IMPORT_ORDER = [ 
    //  'app', 
    //  'ec_poi', 
    //  // ... other models
    // ];
    

'ec_media' => [ 
    'namespace' => 'Wm\WmPackage\Models\Media', 
    'job' => ImportEcMediaJob::class, 
    'geohub_table' => 'ec_media', 
    'identifier' => 'custom_properties->geohub_id', 
    'fields' => [
        // 'local_field_name' => 'geohub_field_name',
    ], 
    'properties' => [
        // 'local_property_name' => 'geohub_property_name',
    ],
    'relations' => [
        // 'relation_name' => [...]
    ], 
],

'name' => [ 
    'field' => 'name', // Source field in Geohub data
    'transformer' => [DataTransformer::class, 'jsonToArray'] 
]
bash
php artisan vendor:publish --tag="wm-package-migrations"
php artisan migrate