All Questions
Tagged with php url-routing
72 questions
3
votes
2
answers
223
views
PHP Router For MVC with strict routing requirements
I had previously asked the question here.
The response was pretty much "wow this is bad".
So I learned everything I could and wrote what I believe to be better using TDD.
The strict ...
1
vote
1
answer
341
views
Index.php automatic router for custom MVC
In house we have been building our own MVC framework. One of the things that was important in the project was to not have to add routes manually but instead have a standard and let the index ...
3
votes
2
answers
223
views
Router and solid principle
I would like to know if my Routing system respects the solid principle ?
The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
2
votes
1
answer
364
views
Route Improvement in Laravel 8
I have below route. I am using Laravel 8.
...
2
votes
0
answers
100
views
implementation of a mvc url router with low coupling and solid principles
i'm building an url router and i want to improve it to respect SOLID principles, i want suggestions of how can i make it less coupled.
here's my current code:
Router.php
...
2
votes
1
answer
95
views
PHP code for blacklisting and rewriting/redirecting URLs
We faced an issue where URLs had a wrong "subfolder" in its URL, so e.g.
example.com/match1/randomgenerated
should have been
...
0
votes
1
answer
79
views
Improving PHP MVC code for personal website [closed]
Github for project: https://github.com/wrpd/portfolio
I have a very general understanding of MVC but haven't ever implemented it. In an effort to improve my understanding and get back into a little ...
4
votes
2
answers
2k
views
Load other files (from outside public_html) under index.php
I wanted to load every page under index.php with a simple index.php?do=login
For example when the link index.php?do=login or <...
2
votes
1
answer
507
views
Simple MVC built in PHP
I tried to make a MVC in PHP with OOP approach. Code Review this so I can understand whether am I using the best practices and can I legally call it a MVC framework or not. Also, I am going with 1 ...
1
vote
1
answer
93
views
Simple routing system
This is my first routing system on PHP. As you can see it's very simple. Any advice or tip about it that can make it better? I want to make it better so I could use it in real websites.
First I ...
3
votes
1
answer
4k
views
Simple PHP Router for home grown MVC framework
I don't know if you guys get tired of seeing a bunch of requests for review of similar projects, but I was really looking for advice.
My website is designed on the MVC pattern. I have a very simple ...
1
vote
1
answer
1k
views
PHP OOP API Class
I want to do an API or contract in Laravel focus when one person wants a contract or credit, but honestly it's for a scholarship but the process it's similar when I got a credit from a bank. Honestly ...
1
vote
1
answer
99
views
PHP code to show a PHP page
I'm trying to avoid manually updating a whitelist of pages, so I wrote the following that I might use, but I'd like my fellow, more experienced, developers to let me know if this is safe. By safe, I ...
2
votes
2
answers
16k
views
PHP Routing with MVC Structure
I'm trying to do a simple CMS with PHP from scratch using MVC structure.
Yesterday I posted this, which is a login system using PHP and it works but it has a handful of problems regarding the OOP ...
3
votes
2
answers
227
views
PHP MVC framework
I am kind of new to MVC, I've read lots of tutorials online but each keep using different approaches so I decided to create mine. Below is what my code looks like.
index
...