PHP code example of liquetsoft / fias-laravel

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

    

liquetsoft / fias-laravel example snippets


    'providers' => [
        // Other Service Providers
        Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\LiquetsoftFiasBundleServiceProvider::class,
    ],
    

    // config/liquetsoft_fias.php
    'eloquent_connection' => 'custom_connection',
    

    // config/liquetsoft_fias.php
    'allow_bundle_migrations' => false,
    

    // config/liquetsoft_fias.php
    /*
     * Имя класса для сущности, которая хранит историю версий ФИАС.
     */
    'version_manager_entity' => FiasVersion::class,
    /*
     * Связка между сущностями ФИАС и моделями в проекте.
     */
    'entity_bindings' => [
        'ADDR_OBJ' => AddrObj::class,
        'ADDR_OBJ_DIVISION' => AddrObjDivision::class,
        'ADDR_OBJ_TYPES' => AddrObjTypes::class,
        'ADM_HIERARCHY' => AdmHierarchy::class,
        'APARTMENTS' => Apartments::class,
        'APARTMENT_TYPES' => ApartmentTypes::class,
        'CARPLACES' => Carplaces::class,
        'CHANGE_HISTORY' => ChangeHistory::class,
        'HOUSES' => Houses::class,
        'HOUSE_TYPES' => HouseTypes::class,
        'MUN_HIERARCHY' => MunHierarchy::class,
        'NORMATIVE_DOCS' => NormativeDocs::class,
        'NORMATIVE_DOCS_KINDS' => NormativeDocsKinds::class,
        'NORMATIVE_DOCS_TYPES' => NormativeDocsTypes::class,
        'OBJECT_LEVELS' => ObjectLevels::class,
        'OPERATION_TYPES' => OperationTypes::class,
        'PARAM' => Param::class,
        'PARAM_TYPES' => ParamTypes::class,
        'REESTR_OBJECTS' => ReestrObjects::class,
        'ROOMS' => Rooms::class,
        'ROOM_TYPES' => RoomTypes::class,
        'STEADS' => Steads::class,
    ],
    

    // config/liquetsoft_fias.php
    'entity_bindings' => [
        // 'CARPLACES' => Carplaces::class,
    ],
    

    // config/liquetsoft_fias.php
    'files_filter' => [
        "#^.+/extracted/30/AS_.+$#", // разрешает все данные для региона
        "#^.+/extracted/AS_.+$#",    // разрешает общие словари
        // все остальные файлы будут проигнорированы
    ],
    

        //в config/flare.php
        'reporting' => [
            'report_queries' => false,
            'report_query_bindings' => false,
        ],
        

        // в config/telescope.php
        'ignore_commands' => [
            'liquetsoft:fias*',
        ],
        
bash
    php artisan vendor:publish --provider="Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\LiquetsoftFiasBundleServiceProvider"
    
bash
    php artisan migrate
    
bash
    php artisan liquetsoft:fias:install
    
bash
    php artisan liquetsoft:fias:update
    
bash
    php artisan liquetsoft:fias:status
    
bash
    php artisan liquetsoft:fias:versions
    
bash
    php artisan liquetsoft:fias:version_set 20160101
    
bash
        php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider" --tag="flare-config"