nateritter/laravel-spark-pages 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nateritter/laravel-spark-pages

Composer 安装命令:

composer require nateritter/laravel-spark-pages

包简介

Easy CMS-like page creation and editing for Laravel Spark

README 文档

README

Compatibility

Laravel Spark Laravel Spark Pages Laravel
0.5.x 0.4.x 5.5.*
0.4.x 0.3.x 5.4.*
0.3.x 0.3.x 5.4.*
0.2.x 0.2.x 5.3.*
0.1.x 0.1.x 5.2.*

Overview

This package adds a simple CMS-like page system to Laravel Spark. It allows developers and non-technical users to add and edit pages (articles, blog posts, FAQ's etc.) very quickly and without the need for a deployment.

Alt text

We have purposely chosen not to overcomplicate this add-on. If your product is successful and you end up needing more bells and whistles you may want to look into building your own solution. This is meant as a minimally viable solution that can be used until the product is worth investing more resources into.

Note that this package is under active development. Feel free to open an issue and/or submit a pull request if you see anything amiss.

Features

  • The ability to add/edit/delete pages is restricted to users with email addresses in the spark developers array.
  • Provides simple Summernote WYSIWYG editor.
  • Provides a simple editable sidebar.
  • A user with appropriate permissions will see a create button in the dropdown options list. If the user is on a page that can be edited, an edit link will be visible.
  • Only pages that a marked published will be visible to non-developers.
  • Ability to delete pages (note that this is a hard delete).
  • All views can be customized by editing the view file found in resources/views/vendor/laravel-spark-pages/.
  • Supports nested folder structure slugs (e.g. /blog/my-awesome-post)

Basic Installation

Add the package to your existing Spark installation:

composer require nateritter/laravel-spark-pages

Add the following to the providers array in config/app.php. This provider must be registered as the last service provider on the providers array:

NateRitter\LaravelSparkPages\PagesServiceProvider::class

Publish migrations:

php artisan vendor:publish --provider="NateRitter\LaravelSparkPages\PagesServiceProvider" --tag='migrations'

Run migrations:

php artisan migrate

Publish assets:

php artisan vendor:publish --provider="NateRitter\LaravelSparkPages\PagesServiceProvider" --tag='assets'

Add the following line to resources/assets/js/app.js:

require('./laravel-spark-pages-components/delete-button');

Compile your assets:

npm run dev

Adding an "Add Page" Dropdown Menu Link

If you'd like to add a link in your developer's dropdown menu, you can do that by adding the below "Add Page" link to your resources/views/vendor/spark/nav/developer.blade.php file:

<!-- Kiosk -->
<li>
    <a href="/spark/kiosk">
        <i class="fa fa-fw fa-btn fa-fort-awesome"></i>Kiosk
    </a>
    <a href="/pages/create">
        <i class="fa fa-fw fa-btn fa-plus"></i>Add Page
    </a>
</li>

Alt text

Editing the Sidebar

The template for the sidebar is located at resources/views/vendor/laravel-spark-pages/sidebar.blade.php. Modify this file to your heart's content.

Editing Pages

Navigate to the page you want to edit. If the user you are logged in as has their email address in the Spark developers array then you will see an admin section in the sidebar with the link "Edit this page".

Alt text

Roadmap

  • Build in SEO tools.
  • List view for pages.
  • Ability to have multipe types of sidebars and select which to use on a page-by-page basis.

nateritter/laravel-spark-pages 适用场景与选型建议

nateritter/laravel-spark-pages 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 190 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「pages」 「laravel-spark」 「content-management」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 nateritter/laravel-spark-pages 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nateritter/laravel-spark-pages 我们能提供哪些服务?
定制开发 / 二次开发

基于 nateritter/laravel-spark-pages 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 190
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-02-13