Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/borisklco/php-htmx.mvc-url.shortener

custom MVC - generating shorter URL links, QR codes, and storing statistics
https://github.com/borisklco/php-htmx.mvc-url.shortener

htmx mvc php sql

Last synced: 1 day ago
JSON representation

custom MVC - generating shorter URL links, QR codes, and storing statistics

Awesome Lists containing this project

README

        

# php/htmx custom MVC and router

This project provides a site for generating shorter URL links, QR codes, and storing statistics such as clicks and visit times.

- Routes are defined in `public/index.php`, with support for undefined routes resulting in a 404/error response.
- The response sent to the client will include an HTTP status code and a view.
- Responses can either send a partial update for HTMX swapping or render a full page linked by a template and view.
- Controllers in `app/Controller/*` extend `Response.php`, defining the response with a status code and view.
- `app/Helper.php` and `app/DB.php` handle database calls and custom functions for controllers.
- `app/path.php` defines paths to directories/folders.