PHP code example of takepart-media / statamic-sop

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

    

takepart-media / statamic-sop example snippets


return [

    // Global kill switch. When false, the CP is never blocked and the SOP
    // management screens stay available.
    'enabled' => env('SOP_ENABLED', true),

    // Point this at your primary connection instead if you'd rather keep
    // everything in one database.
    'database' => [
        'driver' => 'sqlite',
        'database' => env('SOP_DATABASE', storage_path('app/sop/sop.sqlite')),
        'prefix' => '',
        'foreign_key_constraints' => true,
    ],

    // Role and group handles whose users skip the gate entirely. Super
    // admins always bypass, regardless of this list.
    'bypass' => [
        'roles' => [],   // e.g. ['sop_exempt']
        'groups' => [],  // e.g. ['contractors']
    ],

    // Whether a consent additionally records the client IP / user agent.
    // Both are personal data under the GDPR and off by default — user,
    // version and timestamp already prove the acknowledgment. Enable only
    // with a documented legal basis.
    'audit' => [
        'ip' => false,
        'user_agent' => false,
    ],

];

'bypass' => [
    'roles' => ['sop_exempt'],
],
bash
php please sop:install
bash
php artisan migrate --database=sop --path=vendor/takepart-media/statamic-sop/database/migrations --realpath
php artisan vendor:publish --tag=sop-config