This project is a simple pure MVC framework inspired by Laravel.
To install the project, follow the steps below:
-
Install dependencies by running the following command:
composer install
-
Copy
.env.example
to.env
. -
Create a
mini-mvc
database in your MySQL. -
Change the
DB_USER
andDB_PASSWORD
variables in the.env
file to your MySQL username and password. -
Run the following command to run migrations:
php migration migrate
-
Run the following command for seeding (optional):
php seed
-
To use the project, you can run it with the following command:
php -S localhost:8000 -t public
Here, the port is set to 8000, but you can change it to any other port.
-
To run tests, use the following command:
./vendor/bin/phpunit -c phpunit.xml
Before running tests, make sure you have a database named
mini-mvc-test
in your MySQL. Also, if needed, modify the username and password in the.env.testing
file.
mini-mvc
├───app
│ ├───Helpers
│ ├───Http
│ │ └───Middlewares
│ ├───Models
│ └───Validators
├───bootstrap
├───core
│ ├───Contracts
│ │ ├───DB
│ │ ├───Http
│ │ └───Validator
│ ├───DB
│ │ └───Schema
│ ├───Exceptions
│ ├───Http
│ └───Validator
│ └───Rules
├───database
│ └───migrations
├───public
├───storage
│ ├───cache
│ └───logs
├───tests
│ ├───Feature
│ │ ├───Core
│ │ └───Models
│ ├───Traits
│ └───Unit
│ ├───Core
│ │ ├───Exceptions
│ │ ├───Http
│ │ └───Validator
│ │ └───Rules
│ ├───Models
│ └───Validators
└───views
├───auth
├───layouts
└───profile
If you would like to contribute to this project, please follow the guidelines below for bug reports, feature requests, or pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.
I would like to acknowledge the following sources and references used in this project:
For any questions or inquiries, please feel free to reach out to me via email at Mehdi Daalvand.