PHP code example of phact-cmf-modules / filler

1. Go to this page and download the library: Download phact-cmf-modules/filler 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/ */

    

phact-cmf-modules / filler example snippets




return [
    \Modules\Catalog\Models\Category::class => [
        'scheme' => 'tree',
        'dict' => 'categories',
        'dictSettings' => [
            'title' => 'name'
        ],
        'fields' => [

        ],
        'skip' => [],
        'limit' => 100
    ],
    \Modules\Catalog\Models\Product::class => [
        'scheme' => 'flat',
        'fields' => [
            'category' => [
                'filter' => [
                    'lft' => new \Phact\Orm\Expression('rgt - 1')
                ],
                'exclude' => []
            ],
            'price' => [
                'from' => 1000,
                'to' => 20000
            ]
        ],
        'skip' => [],
        'limit' => 100
    ]
];

   ...
    'dictSettings' => [
        'name' => 'title'
    ]
   ...
bash
# php index.php Filler Fill