Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

PHP router + Test of MCV structure - #32

Merged
TheRefraction merged 1 commit into
devfrom
feature-php-router
Apr 7, 2026
Merged

PHP router + Test of MCV structure#32
TheRefraction merged 1 commit into
devfrom
feature-php-router

Conversation

@TheRefraction

Copy link
Copy Markdown
Owner

I wrote a simple PHP router that is ran by the Apache server under src/public/index.php. It then retrieves routes from src/routes/web.php and checks if depending on the user's request, the controller exists. It then loads the appropriate view. There are some examples I tested of routes, views and controllers. I also used a simple model to check whether I could establish a connection to MySQL.

I also added src/config/database.php to establish a connection with the database.

I did not write the 404 page, but it will be loaded for unknown routes once written.

@TheRefraction TheRefraction added this to the First Draft milestone Apr 7, 2026
@TheRefraction TheRefraction self-assigned this Apr 7, 2026
@TheRefraction TheRefraction linked an issue Apr 7, 2026 that may be closed by this pull request
@TheRefraction TheRefraction moved this from Backlog to In review in WE4X_SI40_Project Apr 7, 2026

@weewee-baguette weewee-baguette left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaahhh

@Geemiinii Geemiinii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@TheRefraction
TheRefraction merged commit 8184f6f into dev Apr 7, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In review to Done in WE4X_SI40_Project Apr 7, 2026
@TheRefraction
TheRefraction deleted the feature-php-router branch April 7, 2026 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Create MCV structure + PHP router

3 participants