{"id":14987249,"url":"https://github.com/codeigniter4projects/playground","last_synced_at":"2025-04-04T13:12:15.962Z","repository":{"id":36374170,"uuid":"223215442","full_name":"codeigniter4projects/playground","owner":"codeigniter4projects","description":"A space to learn and experience CodeIgniter 4","archived":false,"fork":false,"pushed_at":"2025-01-24T16:51:55.000Z","size":17997,"stargazers_count":143,"open_issues_count":1,"forks_count":47,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2025-03-28T12:08:34.436Z","etag":null,"topics":["codeigniter","codeigniter4","examples","php","playground"],"latest_commit_sha":null,"homepage":null,"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/codeigniter4projects.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T16:20:31.000Z","updated_at":"2025-02-17T17:07:20.000Z","dependencies_parsed_at":"2023-01-17T00:54:23.457Z","dependency_job_id":"72fc389b-31dc-4d92-b3d4-f324d568b771","html_url":"https://github.com/codeigniter4projects/playground","commit_stats":{"total_commits":240,"total_committers":7,"mean_commits":"34.285714285714285","dds":0.5708333333333333,"last_synced_commit":"6f74bca741524d88ebe7cd7ada20cc9bac8d2b85"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4projects%2Fplayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4projects%2Fplayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4projects%2Fplayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4projects%2Fplayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeigniter4projects","download_url":"https://codeload.github.com/codeigniter4projects/playground/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182378,"owners_count":20897380,"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","codeigniter4","examples","php","playground"],"created_at":"2024-09-24T14:14:19.737Z","updated_at":"2025-04-04T13:12:15.943Z","avatar_url":"https://github.com/codeigniter4projects.png","language":"PHP","readme":"# Playground\n\nA space to learn and experience CodeIgniter 4\n\n[![](https://github.com/codeigniter4projects/playground/workflows/PHPUnit/badge.svg)](https://github.com/codeigniter4projects/playground/actions/workflows/test.yml)\n[![](https://github.com/codeigniter4projects/playground/workflows/PHPStan/badge.svg)](https://github.com/codeigniter4projects/playground/actions/workflows/analyze.yml)\n[![](https://github.com/codeigniter4projects/playground/workflows/Deptrac/badge.svg)](https://github.com/codeigniter4projects/playground/actions/workflows/inspect.yml)\n[![Coverage Status](https://coveralls.io/repos/github/codeigniter4projects/playground/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4projects/playground?branch=develop)\n\nThis playground is here to help you learn CodeIgniter 4 by example. We try to cover use cases for the most\ncommon tasks you'll find yourself doing in web applications. Where there are multiple ways to do something,\nwe've tried to give examples of doing things in each way.\n\nThis isn't meant to replace [the docs](https://codeigniter4.github.io/CodeIgniter4/index.html). This is just\nsomething to look at to get a deeper understanding, or to better see how something could be done in practice.\n\n## Resources\n\nThere are two primary ways to learn about what's going on here in the Playground. The first is the code itself.\nWe've heaped a LOT of comments throughout the code. They're your best docs. So explore them in depth.\nAdditionally, there's a small collection of docs in the conveniently named [docs](docs) folder.\n\nTo setup a working playground on your own local device, read through the next section.\n\n## Getting Started\n\nIn order to get the playground setup on your own computer, you'll need a few minimum requirements - all of which\nare listed on [CodeIgniter's repo](https://github.com/codeigniter4/CodeIgniter4#server-requirements). Basically,\nas long as you are running PHP 8.1 or later you'll meet most of them.\n\nWhile CodeIgniter does not require it, using this repo also requires the use of\n[Composer](https://getcomposer.org/) to install CodeIgniter as a dependency, and PHPUnit - the test framework.\nYou don't need that installed globally, and we actually recommend against it, since different projects likely\nrequire different versions of PHPUnit installed as time goes on and it can become tricky maintain a local\nenvironment that works with all of the different versions.\n\nWhile it can be downloaded as a zip and extracted, we'll use [git](https://git-scm.com/) to manage things.\n\nWith those out of the way, it only takes a few small steps to get the project up and running locally.\n\n1 - Clone the repo if you haven't already, from the CLI:\n\n```console\ngit clone https://github.com/codeigniter4projects/playground\n```\n\nThat creates a new directory, `playground`, under your current directory.\n\n2 - Enter the new directory and install the project dependencies with Composer. NOTE: The command shown\nhere assumes that you have Composer loaded globally. If you don't, then pretend we're using `composer.phar`.\n\n```console\ncd playground\ncomposer install\n```\n\n3 - Copy `.env.example` in the project directory and name it `.env`. Then open it up and verify the settings:\n\n- First, `CI_ENVIRONMENT` is set to `development` as this enables error handling, the debug toolbar, and some other\n  things handy while in development.\n\n- Next make sure that `app.baseURL` matches whatever you are currently running your site at. If you use `spark`,\n  then it already matches the default. If this doesn't match, then generated links might not work, and your\n  developer toolbar will never show up.\n\n- Finally while you're in there, you can edit your database settings, though you can do that in `app/Config/Database.php`\n  just as easily. Since we won't deploy this to multiple servers it's no big deal to edit the config files directly.\n\n4 - Back on the command line, we install all of the needed database tables and sample data.\n\n```console\nphp spark migrate\nphp spark db:seed PlaygroundSeeder\n```\n\n5 - That's it! If you're hosting through Apache, Nginx, etc, then head to your site. If you just want a quick\nway to work with your site locally, go back to the CLI and start up `spark`, CodeIgniter's small server.\n\n```console\nphp spark serve\n```\n\nIf you get would like to change the port it's running on, that's no problem:\n\n```console\nphp spark serve --port 8081\n```\n\nEnjoy!\n\n## Code Challenges\n\nThere are some portions of the code intentionally left for _you_ to finish. Once you are familiar with\nthe project and have read through the docs try searching the code for anything with the comment **Help!**.\n\n## Images\n\nAll images in this repo were created by MidJourney and are can be used freely in non-commercial use cases.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4projects%2Fplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeigniter4projects%2Fplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4projects%2Fplayground/lists"}