ametsuramet/suprb-cms-builder

CMS Builder for Laravel 5.7+

v1.0 2018-10-24 04:25 UTC

This package is auto-updated.

Last update: 2024-03-19 11:39:51 UTC


README

INSTALL

So easy to install! Install with composer:

composer require "ametsuramet/suprb-cms-builder:dev-master"

PUBLISH CMS JSON FILE

php artisan vendor:publish --tag=cmsbuilder-json --force

EDIT JSON FILE

edit cmsbuilder.json

[
	{
		"name": "Book",
		"softdelete": false,
		"primaryKey": null,
		"resource": true,
		"relations": [
			{"type": "belongs_to", "target":"Category"}
		],
		"schema": [
			{
				"field": "title",
				"type": "string",
				"nullable": true,
				"searchable": true,
				"default": "NULL",
				"form_type": "text",
				"options": []
			},
			{
				"field": "description",
				"type": "text",
				"nullable": true,
				"searchable": true,
				"default": "NULL",
				"form_type": "textarea",
				"options": []
			},
			{
				"field": "picture",
				"type": "string",
				"nullable": true,
				"searchable": false,
				"default": "NULL",
				"form_type": "file",
				"options": []
			},
			{
				"field": "author_id",
				"type": "integer:unsigned",
				"nullable": true,
				"searchable": false,
				"default": "NULL",
				"form_type": "select",
				"options": [
					{"value": 1, "label": "user 1"},
					{"value": 2, "label": "user 2"}
				]
			},
			{
				"field": "category_id",
				"type": "integer:unsigned",
				"nullable": true,
				"searchable": false,
				"default": "NULL",
				"form_type": "select",
				"options": []
			},
			{
				"field": "publish",
				"type": "boolean",
				"nullable": true,
				"searchable": false,
				"default": "true",
				"form_type": "radio",
				"options": [
					{"value": 1, "label": "option 1"},
					{"value": 2, "label": "option 2"}
				]
			}
		]
	}
]

USE

Generate CMS

php artisan cms:generate

TODO

  • MIGRATION
  • MODEL
  • VIEW
  • CONTROLLER
  • ROUTE
  • REQUEST
  • PERMISSION
  • JWT-Support
  • Swagger-Support
  • Faker
  • Socialite
  • Update Feature

CREDITS