PHP code example of liquidstack / core
1. Go to this page and download the library: Download liquidstack/core 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/ */
liquidstack / core example snippets
// App/config/modules/webadmin.php
'database' => [
'connection' => 'liquidstack',
'table_prefix' => 'ls_webadmin_',
],
// App/config/modules/blog.php
'database' => [
'connection' => 'liquidstack',
'table_prefix' => 'ls_blog_',
],
return [
'public_paths' => [
'es' => '/noticias',
'eu' => '/eu/albisteak',
'en' => '/en/news',
],
'public_index' => [
'page_size' => 12,
'pagination_paths' => [
'es' => '/noticias/pagina/{page}',
'eu' => '/eu/albisteak/orria/{page}',
'en' => '/en/news/page/{page}',
],
],
'sitemap_path' => '/blog-sitemap.xml',
'sitemap_cache' => [
'enabled' => false,
'ttl_seconds' => 300,
],
'public_article_view' => 'App/views/blog-article.php',
'database' => [
'connection' => 'liquidstack',
'table_prefix' => 'ls_blog_',
],
];
'/form' => 'formContact.php',
'/languages/update' => 'updateLanguage.php',
'/es/showroom' => [
'resources' => 'templates',
'content' => 'templates',
'view' => '../App/views/_showroom.php',
],
bash
php -r "echo rtrim(strtr(base64_encode(random_bytes(32)), '+/', '-_'), '='), PHP_EOL;"