{"id":51008557,"url":"https://github.com/ivalshamkya/php-pdo-mvc","last_synced_at":"2026-06-20T23:33:54.405Z","repository":{"id":209422150,"uuid":"724017906","full_name":"ivalshamkya/php-pdo-mvc","owner":"ivalshamkya","description":"A minimalistic PHP PDO MVC (Model-View-Controller) template for building structured and modular web applications.","archived":false,"fork":false,"pushed_at":"2024-01-04T14:16:35.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-20T23:33:53.779Z","etag":null,"topics":["minimalist","mvc","pdo","php","simple"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivalshamkya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-27T08:22:26.000Z","updated_at":"2025-12-30T17:48:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"80f1a0e5-e215-4c90-876a-ced480155277","html_url":"https://github.com/ivalshamkya/php-pdo-mvc","commit_stats":null,"previous_names":["ivalshamkya/php-pdo-mvc"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ivalshamkya/php-pdo-mvc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivalshamkya%2Fphp-pdo-mvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivalshamkya%2Fphp-pdo-mvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivalshamkya%2Fphp-pdo-mvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivalshamkya%2Fphp-pdo-mvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivalshamkya","download_url":"https://codeload.github.com/ivalshamkya/php-pdo-mvc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivalshamkya%2Fphp-pdo-mvc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34589205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minimalist","mvc","pdo","php","simple"],"created_at":"2026-06-20T23:33:53.884Z","updated_at":"2026-06-20T23:33:54.401Z","avatar_url":"https://github.com/ivalshamkya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple PHP PDO MVC Template\n\n## Overview\n\nThis PHP template is a simple implementation of the Model-View-Controller (MVC) architectural pattern using PDO (PHP Data Objects) for database connectivity. It provides a structured and modular approach to building web applications, making it easier to manage and scale projects.\n\n## Components\n\n### 1. Models\n\nThe `models` directory is intended for organizing your data models. Models encapsulate the logic for interacting with the application's data, such as querying the database or performing specific business logic. This separation enhances maintainability and modularity in your PHP-PDO-MVC project.\n\n### 2. Views\n\nThe `views` directory holds your HTML templates. Views are rendered by controllers, and data can be passed to them for dynamic content.\n\n### 3. Controllers\n\nThe `controllers` directory is where you organize your controller classes. Each controller handles specific routes and user interactions.\n\n### 4. Config\n\nThe `Config` file contains constants for configuring your database connection and base URL. Update the values according to your environment.\n\n### 5. Controller\n\nThe `Controller` class acts as the base controller for your application. It includes methods for rendering views and redirecting to other URLs. Controllers extend this base class.\n\n### 6. Router\n\nThe `Router` class handles the routing of incoming requests to the appropriate controller and action. It allows you to define routes easily and supports different HTTP methods.\n\n### 7. Database\n\nThe `Database` class encapsulates the database connection logic using PDO. It provides methods for executing queries, binding parameters, and fetching results.\n\n## Getting Started\n\n1. Define your routes in the `App.php`.\n2. Create controller classes in the `controllers` directory, extending the `Controller` base class.\n3. Add methods in your controllers to handle different actions.\n4. Create corresponding views in the `views` directory.\n5. Configure your database connection in the `Config` file.\n6. Start building your application by adding more controllers, views, and models.\n\nThis template provides a foundation for building PHP web applications using the MVC pattern. It's recommended to expand upon it based on your project requirements, adding models, additional features, and improving security.\n\n---\n\n## Contributions\n\n🎉 **Contributions Welcome!** 🎉\n\nWe appreciate and encourage contributions to enhance and expand this PHP-PDO-MVC template. Whether you're fixing bugs, improving documentation, or adding new features, your efforts are valued.\n\n### How to Contribute\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Make your changes and ensure they align with the coding standards.\n4. Write tests for your changes, if applicable.\n5. Submit a pull request with a clear description of your changes.\n\n### Contributors\nA big thanks to all the contributors who have helped improve this PHP-PDO-MVC template!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivalshamkya%2Fphp-pdo-mvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivalshamkya%2Fphp-pdo-mvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivalshamkya%2Fphp-pdo-mvc/lists"}