{"id":26794779,"url":"https://github.com/lutsen/lagan-todobackend","last_synced_at":"2026-07-06T11:31:59.755Z","repository":{"id":57010695,"uuid":"82321064","full_name":"lutsen/lagan-todobackend","owner":"lutsen","description":"A Todo-Backend example built with Lagan.","archived":false,"fork":false,"pushed_at":"2017-02-18T08:18:30.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T07:39:30.694Z","etag":null,"topics":["json-api","lagan","php","todobackend"],"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/lutsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-17T17:24:53.000Z","updated_at":"2017-04-25T14:35:55.000Z","dependencies_parsed_at":"2022-08-21T15:10:21.922Z","dependency_job_id":null,"html_url":"https://github.com/lutsen/lagan-todobackend","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lutsen/lagan-todobackend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Flagan-todobackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Flagan-todobackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Flagan-todobackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Flagan-todobackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lutsen","download_url":"https://codeload.github.com/lutsen/lagan-todobackend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Flagan-todobackend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35189713,"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-07-06T02:00:07.184Z","response_time":106,"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":["json-api","lagan","php","todobackend"],"created_at":"2025-03-29T17:28:52.993Z","updated_at":"2026-07-06T11:31:59.710Z","avatar_url":"https://github.com/lutsen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lagan Todo-Backend\n==================\n\nA [Todo-Backend](http://www.todobackend.com/) example built with [Lagan](https://www.laganphp.com/).\n\n\nRequirements\n------------\n\n- PHP 5.5 or newer\n- A database. I use MySQL in this repo for now, but others should work as well. [Check out the RedBean documentation for that](http://redbeanphp.com/index.php?p=/connection).\n- An Apache webserver if you want to use the .htaccess URL rewriting. But other webservers should work as well; [check out the Slim documentation for that](http://www.slimframework.com/docs/start/web-servers.html).\n- [PDO plus driver for your database](http://php.net/manual/en/book.pdo.php) (Usually installed)\n- [Multibyte String Support](http://php.net/manual/en/book.mbstring.php) (Usually installed too)\n\n\n\nInstall Lagan Todo-Backend\n==========================\n\nFirst install Lagan Todo-Backend and its dependencies with [Composer](https://getcomposer.org/) with this command: `$ php composer.phar create-project lagan/lagan-todobackend [project-name]`  \n(Replace [project-name] with the desired directory name for your new project)\n\nThe Composer script creates the *cache* directory, *config.php* file and RedBean *rb.php* file for you.\n\nUpdate *config.php* with:\n- your database settings\n- your server paths\n- the admin user(s) and their password(s)\n\nLagan uses [Slim HTTP Basic Authentication middleware](http://www.appelsiini.net/projects/slim-basic-auth) to authenticate users for the admin interface. Make sure to change the password in *config.php*, and use HTTPS to login securely.\n\n\n\nAbout the Lagan Todo-Backend\n============================\n\n\nTodo content model\n------------------\n\nThe Lagan Todo-Backend uses the Todo content model. This is in the *Todo.php* file in the *models/lagan* directory. It contains a type, a description and an aray with different content properties, just like any Lagan model.\n\nIf you want to work with Lagan, you can add your own content models by just adding class files like this to the *models/lagan* directory. Lagan will automatically create and update database tables for them. Nice!\n\n\nProperty types\n--------------\n\nThe Todo content model the Boolean, Hashid, Slug and String property types. All property types have their own Lagan Property type controller. Each property type controller is a dependency, added with Composer using the *composer.json* file. This way new property types can be developed seperate from the Lagan project code. There are many more Lagan property type controllers available.\n\n\nTodo-Backend API routes\n-----------------------\n\nThe Todo-Backend API routes are in the *todobackend.php* file in the *routes* directory.\n\nAll routes in this directory are automatically included in your Lagan app.\n\n\nAdmin interface\n---------------\nLagan comes with a web interface that is \"automagically\" created. You can enter the Lagan web interface by going to the */admin* directory on the webserver where you installed Lagan. Here you can log in with the username and password you added in the *config.php* file. Now you can add or edit content objects based on the Lagan models.\n\n\n\nWhy use Lagan?\n==============\n\n- Content models are easily created and modified\n- Content models consist of a simple combination of arrays\n- Content models can be any combination of properties\n- Configuration and editing are separated\n- All configuration is done by code, so developers are in control there\n- Content can be edited with a web interface, so editors can do their thing\n- The web interface is automagically created\n- Lagan is built on proven open-source PHP libraries:\n  - [Slim framework](http://www.slimframework.com/)\n  - [RedBean ORM](http://redbeanphp.com/)\n  - [Twig template engine](http://twig.sensiolabs.org/)\n- It is easy to extend with new content property types\n\n\nMore about Lagan\n----------------\n\nYou can learn more about Lagan on the [Lagan website](https://www.laganphp.com/).\n\n\n\nLagan is a project of [Lútsen Stellingwerff](http://lutsen.land/) from [HoverKraft](http://www.hoverkraft.nl/), and started as the backend for [Cloud 9](https://www.cloud9.world/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutsen%2Flagan-todobackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flutsen%2Flagan-todobackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutsen%2Flagan-todobackend/lists"}