Download the PHP package larasense/static-site-generation without Composer
On this page you can find all versions of the php package larasense/static-site-generation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download larasense/static-site-generation
More information about larasense/static-site-generation
Files in larasense/static-site-generation
Package static-site-generation
Short Description define routes in your application with content that can be static generated either for performance issues or for simplicity.
License MIT
Informations about the package static-site-generation
Active development: Not ready for use
This package is in active development.
Static Site Generation and Inmidiate Site Reconsiliation
In some cases using all you resources or most of the services in the application infraestructure in every request is unnecessary. In some cases a page need to be generated only one time and it can be done as a deploy step.
Think in a eCommerce site: the landing page is the same for every visitor and the product page it also the same for every consumer. Now, we are not talking on a static only site like a documentation site, but application that the first render can be done once and only access the Databases or API's only if the user start to interact with it.
Instalation
Config
Add the Service provider to the end of the list of providers
How to use it
create a controller
in the controller define the attributes to SSG or ISR
and then use the command to generate the renders
add this command to the CI/CD as a deploy step and you are good to go.
Define path function
Some times the routes have some dynamic parameters. For those cases you can use the path function
In the controller define the attribute with the configuration