{"id":15046380,"url":"https://github.com/robertmain/codeigniter-starter","last_synced_at":"2025-10-26T20:32:31.642Z","repository":{"id":48309388,"uuid":"120156970","full_name":"robertmain/codeigniter-starter","owner":"robertmain","description":"A CodeIgniter starter project with pre-configured templating, a base model, exceptions and much, much more. Oh my!","archived":false,"fork":false,"pushed_at":"2021-08-02T10:15:17.000Z","size":523,"stargazers_count":5,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T00:26:25.106Z","etag":null,"topics":["codeigniter","composer","mvc","php","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertmain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-04T05:12:58.000Z","updated_at":"2021-03-21T03:59:35.000Z","dependencies_parsed_at":"2022-08-27T05:03:32.044Z","dependency_job_id":null,"html_url":"https://github.com/robertmain/codeigniter-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmain%2Fcodeigniter-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmain%2Fcodeigniter-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmain%2Fcodeigniter-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmain%2Fcodeigniter-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertmain","download_url":"https://codeload.github.com/robertmain/codeigniter-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238397243,"owners_count":19465143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["codeigniter","composer","mvc","php","unit-testing"],"created_at":"2024-09-24T20:53:02.945Z","updated_at":"2025-10-26T20:32:26.381Z","avatar_url":"https://github.com/robertmain.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeIgniter Starter\n\n[![Build Status](https://travis-ci.org/robertmain/codeigniter-starter.svg?branch=master)](https://travis-ci.org/robertmain/codeigniter-starter) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=robertmain/codeigniter-starter)](https://dependabot.com)\n\nA CodeIgniter starter application designed to get up and running and to be able to write code that is as clean, and testable as possible.\n\n## Installation\n\n- With Composer: `composer create-project robertmain/codeigniter-starter --dev`\n- Manually: `git clone https://github.com/robertmain/codeigniter-starter`\n\n## Why\n\nCodeIgniter applications are currently very difficult to test, since most rely on the huge God object `$this` that everything else (including the class loader ಠ_ಠ) decend from.\n\nThis project brings Composer into the mix, both to load third-party libraries from Packagist, and to facilitate the namespacing of models. This in-turn allows us to create abstractions of business objects that are more testable as a single unit of code and are easier to deal with in the application.\n\n## What\n\nThis CodeIgniter starter project provides the following:\n\n### Testing\n\nA fully functional PHPUnit/Mockery setup with namespaced models\n\n### A Base Model\n\nA basic model abstraction providing some limited CRUD functionality and CRUD lifecycle callbacks. This was inspired by [Jamie Rumbelow\\'s Base Model](https://github.com/jamierumbelow/codeigniter-base-model) but diverged in order to support soft deletes.\n\nThis base model also provides the metadata field names for `created_at`, `updated_at` and `deleted_at`. This is re-used in the abstract base migration to provide the names of the fields to create as datestamp fields.\n\n### Templating\n\nThe `Plates` templating engine was broguht in to handle templating in CodeIgniter. This allowed for greater flexibility in frontend layout, particularly in regards to things like template reigions, inheritence and partial re-use etc.\n\n### Namespacing\n\nModels can now be namespaced in `App\\Models`. The loader has been extended to support this, however it should behave normally. We get this behaviour for free by using Composer and PSR-4 namespacing in our models.\n\n**Please note:**  due to the way that CodeIgniter loads controllers, controllers cannot be namespaced at this time, otherwise the framework will be unable to locate them.\n\n### Environmental Configuration\n\nDotenv is now used to provide database settings. This prevents database configuration accidentally being comitted and provides an easy, consistent way to setup seperate environments\n\n### Composer Scripts\n\nComposer scritps have also been provided to help manage the development of the application. These are:\n\n- `test:models` - Test the application models\n- `test:controllers` - Test the application controllers\n- `test` - Test models and controllers\n- `docs` Generate php docs from the models and controllers\n- `migrate:latest` - Run the latest database migration and upgrade the database to the latest version\n- `migrate:flush` - Drop the entire database and re-create it. For safety reasons, the application will raise an exception if asked to drop it's database in a production environment\n\n### Exceptions\n\nThis starter project also includes `crazycodr/standard-exceptions` which are used to provide a standardised set of PHP exceptions for common scenarios.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertmain%2Fcodeigniter-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertmain%2Fcodeigniter-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertmain%2Fcodeigniter-starter/lists"}