PHP code example of goldnead / statamic-directory

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

    

goldnead / statamic-directory example snippets


'collections' => [
    'choirs' => ['filters' => ['choir_type' => 'choir_type']],
    'leaders' => [
        'fields' => ['title' => 'name', 'city' => 'town'],
        'filters' => ['focus' => 'focuses'],
    ],
],
bash
php artisan directory:rebuild                  # all types, synchronous
php artisan directory:rebuild --collection=leaders
php artisan directory:rebuild --entry=<id>
php artisan directory:rebuild --queue          # as a queued job
php artisan directory:rebuild --prune          # also drop rows whose Entry is gone