PHP code example of daynnnnn / statamic-database

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

    

daynnnnn / statamic-database example snippets


return [
    'assets_containers' => true,
    'asset_metas' => true,
    'blueprints' => false, // Default true
    'collections' => false, // Default true
    'collection_trees' => true,
    'entries' => true,
    'fieldsets' => false, // Default true
    'forms' => false, // Default true
    'form_submissions' => true,
    'globals' => true,
    'navigation' => true,
    'navigation_trees' => true,
    'taxonomies' => true,
    'terms' => true,
];

public function register()
{
    if (config('statamic.database.blueprints')) {
        $this->app->singleton(
            'Statamic\Fields\BlueprintRepository',
            'Daynnnnn\StatamicDatabase\Blueprints\BlueprintRepository'
        );
    }

    if (config('statamic.database.fieldsets')) {
        $this->app->singleton(
            'Statamic\Fields\FieldsetRepository',
            'Daynnnnn\StatamicDatabase\Fieldsets\FieldsetRepository'
        );
    }
}