PHP code example of johannschopplich / kirby-locked-pages
1. Go to this page and download the library: Download johannschopplich/kirby-locked-pages 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/ */
johannschopplich / kirby-locked-pages example snippets
// config.php
return [
'routes' => [
[
'pattern' => 'logout',
'action' => function () {
kirby()->trigger('locked-pages.logout');
go('/');
}
]
]
];
use JohannSchopplich\LockedPages\Guard;
return [
'johannschopplich.locked-pages' => [
'slug' => 'geschuetzt',
'title' => 'Geschützte Seite',
'error' => [
'password' => 'Das Passwort ist nicht korrekt',
'csrf' => 'Der CSRF-Token ist nicht korrekt'
]
]
];