Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ribafs/php-router
Very simples PHP router system on MVC application
https://github.com/ribafs/php-router
mvc php router simple very-simple
Last synced: about 1 month ago
JSON representation
Very simples PHP router system on MVC application
- Host: GitHub
- URL: https://github.com/ribafs/php-router
- Owner: ribafs
- License: mit
- Created: 2022-09-07T14:56:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-08T23:04:47.000Z (over 2 years ago)
- Last Synced: 2023-03-04T15:39:20.967Z (almost 2 years ago)
- Topics: mvc, php, router, simple, very-simple
- Language: PHP
- Homepage:
- Size: 163 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Application with PHP, MVC and Routes
To simplifier I create one table, customer with only two fields, name and email.
## Discussion forum for the repository
I just created a forum to exchange ideas about MVC and router in PHP
https://github.com/ribafs/php-router/discussions
## Installation
See file INSTALL.md
## Application created based on mini3
https://github.com/panique/mini3## Main objective
When I created this app, I wanted to go out making adaptations to use the route in other apps and get better to be able to use it in production, but it's good to resist this temptation and remember...
The main objective of this application is not to create something to be used in production, but to create a structure in PHP using MVC and routes in the sense of learning these concepts in practice to better understand and use a good PHP framework and this one to be used in production.
## This repository URL
https://github.com/ribafs/php-router
## How to add a new CRUD to another table
- Add a tabela to database
- Add the model to this table
- Add the controller
- Add folder to views
- Add respective code on Core/Router.php
- Add link to new table in App/views/templates/menu.php## Resources
- Bootstrap 5.2
- MVC
- Simple route
- Very simple and easy to understand
- Simple and clean structure
- Create clean and "beautiful" URLs
- Attempts to follow PSR coding guidelines
- Uses PDO for any database request, comes with an additional PDO debug tool to emulate your SQL statements
- Commented code
- Uses only native PHP code, so you don't need to learn a framework to understand MVC
- Use autoloader from PSR-4 and composer## Exaple with automatic router
https://github.com/ribafs/phpoo-livro/tree/main/atualizacoes/php-router2
## Referências sobre rotas para PHP
https://github.com/panique/mini3
https://github.com/ribafs/php-router
https://github.com/ribafs/phpoo-livro
https://github.com/ribafs/mini-mvc
https://helpincoding.com/php-routing-with-parameters/
https://github.com/yousufnoor5/php-basic-routing
## Simple example router
[simple-router](simple-router)
## Routing definition
[Routing.md](Routing.md)
## See my last projects similar to this one:
https://github.com/ribafs/simplest-router
https://github.com/ribafs/micro-framework
## Licence
MIT license.
This means that you can freely use and modify it for personal and commercial projects, only with the credit of the authors.