{"id":13410157,"url":"https://github.com/gabordemooij/redbean","last_synced_at":"2025-05-13T21:04:17.303Z","repository":{"id":580265,"uuid":"213238","full_name":"gabordemooij/redbean","owner":"gabordemooij","description":"ORM layer that creates models, config and database on the fly","archived":false,"fork":false,"pushed_at":"2025-04-23T09:07:28.000Z","size":8243,"stargazers_count":2315,"open_issues_count":5,"forks_count":279,"subscribers_count":88,"default_branch":"master","last_synced_at":"2025-04-28T11:56:55.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.redbeanphp.com","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/gabordemooij.png","metadata":{"files":{"readme":"README.markdown","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-05-29T07:39:09.000Z","updated_at":"2025-04-25T16:27:27.000Z","dependencies_parsed_at":"2023-07-05T15:01:10.316Z","dependency_job_id":"afcb0857-c739-40c5-87d4-ebb34f9bc020","html_url":"https://github.com/gabordemooij/redbean","commit_stats":{"total_commits":2694,"total_committers":75,"mean_commits":35.92,"dds":0.6703786191536749,"last_synced_commit":"b733ef75b3fe2c343b9c688bcf17d91ae8c7aa38"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabordemooij%2Fredbean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabordemooij%2Fredbean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabordemooij%2Fredbean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabordemooij%2Fredbean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabordemooij","download_url":"https://codeload.github.com/gabordemooij/redbean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254028348,"owners_count":22002237,"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":[],"created_at":"2024-07-30T20:01:05.275Z","updated_at":"2025-05-13T21:04:17.278Z","avatar_url":"https://github.com/gabordemooij.png","language":"PHP","funding_links":[],"categories":["PHP","Databases \u0026 ORMs","类库","Table of Contents"],"sub_categories":["数据库","Library"],"readme":"RedBeanPHP 5\n============\n\n[![Build Status](https://travis-ci.org/gabordemooij/redbean.svg?branch=master)](https://travis-ci.org/gabordemooij/redbean)\n\nRedBeanPHP is an easy to use ORM tool for PHP.\n\n* Automatically creates tables and columns as you go\n* No configuration, just fire and forget\n* No complicated package tools, no autoloaders, just ONE file\n\nInstallation (recommended)\n---------------------------\n\nDownload RedBeanPHP from the website:\n\nhttps://redbeanphp.com/download\n\nExtract the archive and put it in your PHP project, voila!\n\nOptional: sha256sum and check signature.\n\n\nInstallation via Composer (not recommended)\n-----------------------------------------\n\nJust open your composer.json file and add the package name ```(e.g. \"gabordemooij/redbean\": \"dev-master\")``` in your require list.\n\n```json\n{\n    \"require\": {\n        \"gabordemooij/redbean\": \"dev-master\"\n    }\n}\n```\n\n**NOTE**: \nYou will find many examples on the RedBean website make use of RedBean's `R` class. Because of namespaced autoloading in Composer, this class will be available as `\\RedbeanPHP\\R` instead of `R`. If you desire to use the much shorter `R` alias, you can add a `use` statement at the beginning of your code:\n\n```php\nuse \\RedBeanPHP\\R as R;\n```\n**NOTE:**\nIt is important to note that when using RedBeanPHP with Composer, there are some extra precautions needed when working with [Models](https://redbeanphp.com/index.php?p=/models). Due to the namespace requirements of Composer, when creating Models we need to use the `SimpleModel` to extend, not `RedBean_SimpleModel`. Furthermore, we need to specify the namespace of the `SimpleModel`, so a full example of using a Model with RedBean with Composer is as follows:\n\n```php\nuse \\RedBeanPHP\\R;\n\nclass User extends \\RedBeanPHP\\SimpleModel\n{\n    ...\n}\n```\nNotice that we also need to add the `use \\RedBeanPHP\\R` statement so that we can use the `R::` shortcut within the Model.\n\n\nQuick Example\n-------------\n\nHow we store a book object with RedBeanPHP:\n```php\n$book = R::dispense(\"book\");\n$book-\u003eauthor = \"Santa Claus\";\n$book-\u003etitle = \"Secrets of Christmas\";\n$id = R::store( $book );\n```\n\nYep, it's that simple.\n\n\nMore information\n----------------\n\nFor more information about RedBeanPHP please consult\nthe RedBeanPHP website:\n\nhttps://www.redbeanphp.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabordemooij%2Fredbean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabordemooij%2Fredbean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabordemooij%2Fredbean/lists"}