This DIY MVC (Model-View-Controller) framework is inspired by Laravel and aims to provide a simplified yet effective way to structure and organize your web application. It includes routing syntax and migrations for efficient development.
- PHP installed on your local machine (PHP 8.1x recommended).
- Composer installed to manage dependencies.
- MySQL or any other database of your choice.
- Clone or download this repository to your local machine.
- Run
composer install
to install the required dependencies. - Configure your database settings in
.env
file. - Run migrations to set up the database schema:
php migrate.php
.
- Define your routes in
resources/web.php
using the specified routing syntax. - Create controllers in the
app/controllers
directory and define actions for handling routes. - Implement models in the
app/models/
directory to interact with the database. - Create corresponding views in the
resources/views/
directory for each controller action. - Access your application through the defined routes.
The routing syntax is inspired by Laravel and follows a similar pattern:
Route::get('/path', [UserController::class, 'login']);
Route::post('/path', [UserController::class, 'login']);