carlson/nova-simple-content
Composer 安装命令:
composer require carlson/nova-simple-content
包简介
A simple content package for pages and blog posts for Laravel applications using Nova
README 文档
README
Purpose
This is a simple package for managing simple content. If all you need is to simplify the boilerplate of setting up Nova resources for things like blog posts and pages with total control over the view, this is for you. If you want complex hierarchical categorization and deep control over the post and page models then this package likely isn't a good fit.
Requirements
- >= Laravel 8
- >= Laravel Nova 3
Features
- Nova resource pages for Posts and Pages
- Independently configurable caching for Posts and Pages
- Event driven caching based on resource Update and Delete
- Unopinionated view templates – write your own!
- Configurable Page and Post route prefix (such as /blog, /content)
- 100% test coverage
Installation
composer require carlson/nova-simple-content- To copy the views for editing:
php artisan vendor:publish --tag=nova-simple-content-views - To copy the config to customize caching and routes:
php artisan vendor:publish --tag=nova-simple-content-config - To set up the required tables:
php artisan migrate
Config
The following values may be configured in the nova-simple-content.php config file:
cache_posts: Turns caching on or off for Posts. Default istruecache_pages: Turns caching on or off for Pages. Default istruepost_list_url: The route for the post list. Default is'/blog'post_detail_slug_prefix: The route prefix for posts, e.g. the '/blog' in /blog/test-slug. Default is'/blog'page_slug_prefix: The route prefix for all pages, e.g. the '/content' in /content/test-slug. Default is'/content'
Caching
Caching of both Pages and Posts is turned on by default, but can be configured independently. To disable either Post or Page caching edit the corresponding value in the nova-simple-content.php config file.
Development
Contributions welcome! There is an included docker-compose.yml with containers for the correct version of PHP with required dependencies and database and cache containers for testing.
Installation
- Clone this repository.
- Ensure Docker is already installed on your machine.
- From the repository root run
docker-compose up -dfrom your terminal.
Testing
All commits of PHP or JavaScript must be accompanied by corresponding tests. To run the test suite enter the running app container (docker exec -it nova_simple_content_app /bin/bash) and run composer test
carlson/nova-simple-content 适用场景与选型建议
carlson/nova-simple-content 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 10 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 carlson/nova-simple-content 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 carlson/nova-simple-content 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-16