mathsgod / puxt
PHP framework
Installs: 434
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:framework
Requires
- php: >=7.3 || >=8.0
- laminas/laminas-config: ^3.7
- laminas/laminas-di: ^3.3
- laminas/laminas-diactoros: ^2.11 || ^3.0
- laminas/laminas-httphandlerrunner: ^2.1
- laminas/laminas-servicemanager: ^3.7
- laminas/laminas-stratigility: ^3.5
- league/event: ^3.0
- league/flysystem: ^2.3 || ^3.0
- league/route: ^5.1
- mathsgod/html: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: *
- twig/twig: ^3.4
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- hostlink/puxt-vue-loader: ^1.0
- monolog/monolog: ^2.7
- dev-main
- 3.1.1
- 3.1.0
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.13.0
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12.0
- 1.11.3
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-10-13 10:16:30 UTC
README
Setup
Create pages folder and add index.php file
use Laminas\Diactoros\Response\HtmlResponse; return new class{ public function get(){ return new HtmlResponse("Hello world"); } }
It will output Hello world
in the browser when reqeust to /
path.
Debug
Set the DEBUG
environment variable to true
to enable debug mode.
DEBUG=true
Exception format
Set the DEBUG_EXCEPTION_FORMAT
environment variable to json
to enable exception format.
DEBUG_EXCEPTION_FORMAT=json
Base path of uri
Set the BASE_PATH
environment variable to change the base path.
For example, set BASE_PATH
to api
will change the base path to /api
.
BASE_PATH=api
Route strategy
Set the ROUTE_STRATEGY
environment variable to change the route strategy.
ROUTE_STRATEGY=json
HTML header
It will change the html title to Custom title
.
use function PUXT\useHead; //call this function in the get method of the page useHead([ "title" => "Custom title", ]);
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]