2017 © Pedro Peláez
 

library laravel-spark-pages

Easy CMS-like page creation and editing for Laravel Spark

image

nateritter/laravel-spark-pages

Easy CMS-like page creation and editing for Laravel Spark

  • Tuesday, February 13, 2018
  • by nateritter
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel Spark Pages

, (*1)

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.*

, (*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., (*3)

Alt text, (*4)

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., (*5)

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., (*6)

, (*7)

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)

, (*8)

Basic Installation

Add the package to your existing Spark installation:, (*9)

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:, (*10)

NateRitter\LaravelSparkPages\PagesServiceProvider::class

Publish migrations:, (*11)

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

Run migrations:, (*12)

php artisan migrate

Publish assets:, (*13)

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

Add the following line to resources/assets/js/app.js:, (*14)

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

Compile your assets:, (*15)

npm run dev

, (*16)

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:, (*17)

<!-- 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, (*18)

, (*19)

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., (*20)

, (*21)

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"., (*22)

Alt text, (*23)

, (*24)

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.

The Versions

13/02 2018

dev-master

9999999-dev

Easy CMS-like page creation and editing for Laravel Spark

  Sources   Download

by Nathan Kirschbaum
by Bryan Miller
by Nate Ritter

pages laravel-spark content-management

13/02 2018

v0.4

0.4.0.0

Easy CMS-like page creation and editing for Laravel Spark

  Sources   Download

by Nathan Kirschbaum
by Bryan Miller
by Nate Ritter

pages laravel-spark content-management

03/08 2017

v0.3

0.3.0.0

Easy CMS-like page creation and editing for Laravel Spark

  Sources   Download

by Nathan Kirschbaum
by Bryan Miller

pages laravel-spark content-management

18/09 2016

v0.2

0.2.0.0

Easy CMS-like page creation and editing for Laravel Spark

  Sources   Download

by Nathan Kirschbaum
by Bryan Miller

pages laravel-spark content-management

16/09 2016

v0.1

0.1.0.0

Easy CMS-like page creation and editing for Laravel Spark

  Sources   Download

by Nathan Kirschbaum
by Bryan Miller

pages laravel-spark content-management