tecnodesignc / core-module
The core module for EncoreCMS 3.0 This is required for every install
Installs: 76
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:encore-module
Requires
- php: ^8.2
- astrotomic/laravel-translatable: ^11.12
- composer/installers: ^2.1
- laravelcollective/html: ^6.3
- mcamara/laravel-localization: ^1.7
- nwidart/laravel-modules: ^10.0
- spatie/laravel-responsecache: ^7.4
- tecnodesignc/laravel-sidebar: ^2.7
- tecnodesignc/presenter: ^0.2.6
- tecnodesignc/stylist: ^2.1
- tightenco/ziggy: ^1.5
- yajra/laravel-datatables-oracle: ^10.3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14
- mockery/mockery: ^1.4.4
- orchestra/testbench: 3.8.*
- phpunit/phpunit: ^9.5
README
#Core Modules
To activate the Cache System
Modify
// config/app.php 'providers' => [ ... Modules\Core\Pagecache\ResponseCache\ResponseCacheServiceProvider::class, ];
This package also comes with a facade.
// config/app.php 'aliases' => [ ... 'ResponseCache' => Modules\Core\Pagecache\ResponseCache::class, ];
You can publish the config file with:
php artisan vendor:publish --provider="Modules\Core\Pagecache\ResponseCache\ResponseCacheServiceProvider"
Command available to clear cache
php artisan pagecache:clear
URL rewriting
In order to serve the static files directly once they've been cached, you need to properly configure your web server to check for those static files.
-
For nginx:
Update your
location
block'stry_files
directive to include a check in thepage-cache
directory:location / { try_files $uri $uri/ /page-cache/$uri.html /index.php?$query_string; }
-
For apache:
Open
public/.htaccess
and add the following before the block labeledHandle Front Controller
:# Serve Cached Page If Available... RewriteCond %{REQUEST_URI} ^/?$ RewriteCond %{DOCUMENT_ROOT}/page-cache/pc__index__pc.html -f RewriteRule .? page-cache/pc__index__pc.html [L] RewriteCond %{DOCUMENT_ROOT}/page-cache%{REQUEST_URI}%{QUERY_STRING}.html -f RewriteRule . page-cache%{REQUEST_URI}.html [L]