{"id":17603425,"url":"https://github.com/blwsh/cms","last_synced_at":"2026-05-04T21:39:04.387Z","repository":{"id":57075376,"uuid":"223926536","full_name":"blwsh/CMS","owner":"blwsh","description":"Laravel frontend CMS that allows you to output any model property as an editable field on your frontend.","archived":false,"fork":false,"pushed_at":"2020-02-12T23:54:20.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-05T06:16:11.064Z","etag":null,"topics":["cms","docker","frontend-cms","laravel"],"latest_commit_sha":null,"homepage":"https://blw.sh","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blwsh.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":"2019-11-25T10:54:07.000Z","updated_at":"2020-02-12T23:54:22.000Z","dependencies_parsed_at":"2022-08-24T14:55:43.106Z","dependency_job_id":null,"html_url":"https://github.com/blwsh/CMS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blwsh%2FCMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blwsh%2FCMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blwsh%2FCMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blwsh%2FCMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blwsh","download_url":"https://codeload.github.com/blwsh/CMS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273561,"owners_count":20750906,"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":["cms","docker","frontend-cms","laravel"],"created_at":"2024-10-22T13:47:55.964Z","updated_at":"2026-05-04T21:39:04.329Z","avatar_url":"https://github.com/blwsh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend CMS\n[![Latest Stable Version](https://poser.pugx.org/uniben/cms/version)](https://packagist.org/packages/uniben/cms)\n[![Total Downloads](https://poser.pugx.org/uniben/cms/downloads)](https://packagist.org/packages/uniben/cms)\n[![Latest Unstable Version](https://poser.pugx.org/uniben/cms/v/unstable)](//packagist.org/packages/uniben/cms)\n[![License](https://poser.pugx.org/uniben/cms/license)](https://packagist.org/packages/uniben/cms)\n\nA content management system that allows you to output editable content to the page.\n\n## Install\n\n```shell script\n$ composer require uniben/cms\n```\n\n## Examples\n\n```php\n$model-\u003efield // Field value\n```\n\n```php\n$model-\u003efield-\u003etitle('Default value', 'h2', ['class' =\u003e 'example', 'rand']) // Output \u003ch2 class=\"example ...\" rand data-edtable=\"...\"\u003eField value\u003c/h2\u003e\n```\n\n```php\n$model-\u003efield-\u003eimage() // Output \u003cvideo class=\"...\" data-edtable=\"...\"\u003e\u003csource src=\"...\" type=\"...\"\u003e\u003csource ...\u003e\u003c/h2\u003e\n```\n\n## Restricting editable capabilities\n\nAllow everyone to edit a particular model:\n\n```php\nclass X extends Editable {\n    public function canEdit()\n    {\n        return true;\n    }\n}\n```\n\nOnly allow logged in users to edit:\n\n```php\nclass X extends Editable {\n    public function canEdit()\n    {\n        return auth()-\u003euser(); // Could even check their permissions here?\n    }\n}\n```\n\n## Contributing\n\nFor an easy install of a development environment you can use docker to run using docker. The docker file will install laravel and the package for you along with a temporary database.\n\n### Install\n\n```shell script\n$ make install\n``` \n\n### Start\n\n```shell script\ndocker-compose up -d\n```\n\nVisit `localhost:8080`\n\n## How it works\n\nWhen an editable field is rendered it is given an id which maps to the model type, model id and updated field.\nWhen an update/save is made editable fields which belong to the same model are collated in to an array and sent to an update controller.\n\n## Todo\n* Switch edtable types render methods over to views rather than generatng inside of a method.\n* Handle redirect responses from edtables when a new product is created.\n* Make edtables on the frontend reactive using VueX\n* Use UniBen/laravel-graphqlable for an easy to use documented API.\n* Get wwyswig and image upload fields working using standard libraries.\n* Improve editable type caching and queries in admin\n* Make editable fields revisionable\n* Improve code qualiity\n* Aim for 100% code coverage\n* Make dynamic registration of editable types easy via a service provider\n* Reduce JS bundle size as much as possible\n* Remove server side rendered editables and use vue components with ssr instead to simplify process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblwsh%2Fcms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblwsh%2Fcms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblwsh%2Fcms/lists"}