larawhale / cms
Laravel 内容管理系统包
0.1.2
2020-10-12 18:55 UTC
Requires
- php: ^7.4
- laravel/framework: ^8.0
- laravel/ui: ^3.0
- laravelcollective/html: ^6.0
Requires (Dev)
- dev-master
- 0.1.2
- 0.1.1
- 0.1.0
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/minimist-1.2.6
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/composer/league/flysystem-1.1.4
- dev-dependabot/npm_and_yarn/trim-newlines-3.0.1
- dev-dependabot/npm_and_yarn/ws-6.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/composer/laravel/framework-8.40.0
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-4.0.1
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.8
- dev-feature/fields-multi-files-field
- dev-feature/fields-multi-fields
- dev-branding-one
This package is auto-updated.
Last update: 2024-09-06 08:50:59 UTC
README
这是一个Laravel包,为任何新的或现有的Laravel应用提供内容管理系统的功能。
该包采用两个实体的简单概念,条目和字段。条目可以看作是模型,字段是这些模型的属性。
该包的目标是在尽可能保持可定制性的同时,将内容管理的实现从开发者的手中解放出来。保持使用Laravel框架时的开发流程与开发者习惯一致是很重要的。
安装
可以使用composer安装此包
composer require larawhale/cms
有关此包的安装信息,请参阅文档。
示例
以下是一个条目配置的快速示例。当它在默认的resources/entries
文件夹中保存时,条目将在用户界面中可用。
// resources/entries/post.php return [ 'type' => 'post', 'name' => 'Post', 'view' => 'entries.post', 'fields' => [ [ 'key' => 'route', 'type' => 'route', 'config' => [ 'rules' => 'required', 'label' => 'Url', ], ], [ 'key' => 'title', 'type' => 'text', 'config' => [ 'rules' => 'required|string|max:191', 'label' => 'Title', ], ], [ 'key' => 'body', 'type' => 'textarea', 'config' => [ 'rules' => 'required|string|max:1000', 'label' => 'Body', ], ], ], ];
此配置将在用户界面中渲染以下表单。
此条目配置的字段现在已在配置的resources/views/entries/post.blade.php
文件中可用。
// resources/views/entries/post.blade.php <h1> {{ $entry->title }} </h1> {!! $entry->body !!}
文档
文档可在代码库维基上找到。
许可证
此包属于MIT许可证(MIT)。有关更多信息,请参阅许可证文件。