Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ribafs/simplest-router
The more simple router system in PHPOO with MVC
https://github.com/ribafs/simplest-router
bootstrap examples exemplos mvc php phpoo router routing simple simplest
Last synced: 3 days ago
JSON representation
The more simple router system in PHPOO with MVC
- Host: GitHub
- URL: https://github.com/ribafs/simplest-router
- Owner: ribafs
- License: mit
- Created: 2022-10-02T12:30:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-07T10:37:57.000Z (about 2 years ago)
- Last Synced: 2023-03-29T21:00:05.958Z (almost 2 years ago)
- Topics: bootstrap, examples, exemplos, mvc, php, phpoo, router, routing, simple, simplest
- Language: PHP
- Homepage: https://ribafs.github.io/simplest-router
- Size: 269 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simplest Router
## Click to access/Clique para acessar
[*Português*](pt-BR) | [*English*](en-US)
----------- | ----------
|project
[https://github.com/ribafs/simplest-router](https://github.com/ribafs/simplest-router)
### This routing system was created mainly from the software:
- https://github.com/Izamzawi/blog-php-mvc
- https://github.com/panique/mini3
- https://github.com/nikic/FastRouteThis little routing system works well with PHPOO applications with MVC
Capture the URL and split it into parts: controller, action and parameter
http://localhost/application/controller/action/param
Example
http://localhost/crud-mvc/product/edit/5
## Try with/Support
- Windows 10
- Laragon - PHP 8.1
- Linux Mint 21
- PHP 8.1
- Ubuntu
- 22.04 - PHP 8.1
- 20.04 - PHP 7.4
- 14.04 - PHP 5.5
- Namespace
- Require
- Fixed
- MySQL/MariaDb
- PostgreSQL## PHP 5 does not support:
declare(strict_types = 1);
Nor is the syntax:
$this->controller->{$this->action}( ...$this->params);
## Requirements
- Module mod_rewrite from Apache
## Extra Tips
## Native PHP functions and constants for classes and objects
if ( ! class_exists('App\\Controllers\\ProductController')) die('Class not found!');
die(__CLASS__);
get_class($this);