Download the PHP package sigawa/mvc-core without Composer
On this page you can find all versions of the php package sigawa/mvc-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sigawa/mvc-core
More information about sigawa/mvc-core
Files in sigawa/mvc-core
Package mvc-core
Short Description Customized MVC mini-framework for Dev. purposes and offers room for improvements
License MIT
Informations about the package mvc-core
Custom MVC Framework
Introduction
Welcome to my custom MVC framework! This framework is inspired by in-depth knowledge of Laravel, symfony and Codeignitor Routing capabilities and is designed to be lightweight, flexible, and easy to use. It is perfect for developers who want to understand the inner workings of an MVC framework or those who want to build small to medium-sized applications without the overhead of a full-fledged framework.
Installation
You can install this framework via Composer:
Features
- Lightweight and Fast: Minimal overhead and optimized for performance.
- MVC Structure: Clean separation of concerns with Models, Views, and Controllers.
- Routing: Simple and powerful routing system.
- Database Integration: Easy-to-use database abstraction layer.
- CRUD class ready: All CRUD operations in handy and easily customizable.
- Command line tool 'mcconsole': Run common command line commands (create, make ..) hassle free. by using the 'mcconsole' command utility class
- Templating: Basic templating engine for dynamic views.
- Error Handling: Friendly error pages and detailed stack traces.
Requirements
- PHP 7.4 or higher
- Composer
Getting Started
1. Installation
Ensure that you have initialized the environment before cloning the repository. i.e., run
first, then
Clone the repository or install via Composer:
Copy the mcconsole file to your project root folder to access it in your terminal.
You can initialize a new project using:
2. Configuration
After installation, configure your application by copying the example environment file and updating it with your configuration:
copy the mcconsole file to your project root directory, if u wish to use it for CLI
2.1. User class
Run the following command to create a user model:
Replace the function/class body with the one in the User.example file. Ensure your class includes:
2.2. index.php
Copy the contents of index.example to /app/public/index.php
.
then you will need to add the replace the function/class body with the one in the 'User.example' file the file provides a basic structure of a typical model class. You may modify it as per your need BUT remember to always have the following line in your class
3. Running the Application
Use the built-in PHP server or the mcconsole serve command to run your application:
OR
Navigate to http://localhost:8000
in your browser to see the application in action.
Documentation
Routing
Define your routes in the public/index.php
file:
Controllers
Create controllers in the app/Controllers
directory using:
Example controller:
Models
Create models in the app/Models
directory using:
Example model:
CRUD
Access all CRUD
functions in the CRUD class.
Example:
Views
Create views in the app/views
directory:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue to help improve this project.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- Inspired by Laravel, symfony and codeignitor routing mechanism
- Special thanks to all contributors
Happy coding!
SIGAWA
All versions of mvc-core with dependencies
symfony/console Version 7.1.x-dev
phpmailer/phpmailer Version dev-master