PHP code example of emran-alhaddad / statamic-graphql-protect

1. Go to this page and download the library: Download emran-alhaddad/statamic-graphql-protect 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/ */

    

emran-alhaddad / statamic-graphql-protect example snippets


return [

    // ...

    'middleware' => [
        \Emran\StatamicGraphqlProtect\Http\Middleware\ProtectGraphql::class,
        // other GraphQL middleware (if any)
    ],

    // ...
];

'cache' => false,

'cache' => [
    'expiry' => 0,
],
bash
php artisan vendor:publish --tag=statamic-graphql-protect
txt
config/statamic-graphql-protect.php
txt
config/statamic/graphql.php
txt
config/statamic/graphql.php
bash
php artisan config:clear
php artisan cache:clear
php artisan statamic:stache:clear
txt
statamic-graphql-protect/
├─ src/
│  ├─ Http/Middleware/ProtectGraphql.php
│  └─ ServiceProvider.php
├─ config/statamic-graphql-protect.php
├─ composer.json
├─ README.md
└─ LICENSE