CodeSleeve / platform-publish

Add on publishing capabilities (pages and menus) to platform-core
3 stars 0 forks source link

Getting Started

First add to composer.json

    "codesleeve/platform-publish": "dev-master"

then add the service provider to the providers array in your app\config\app.php

    'Codesleeve\Platform\Publish\ServiceProvider',

then run commands for database

    php artisan migrate --package codesleeve/platform-publish

Models provided with publish

Codesleeve\Platform\Publish\Models\Menu

Name of the menu that hasMany menulinks.

Codesleeve\Platform\Publish\Models\MenuLink

Links that belong to a menu, attributes are:

Codesleeve\Platform\Publish\Models\Page

Content of a page that can be displayed, attributes are:

Codesleeve\Platform\Publish\Models\Photo

This is a place to store photos at. It uses Codesleeve\Stapler to handle uploads and it can be used with the wysiwyg uploader too.

Helper functions (possibly?)

menulinks($title) : Returns an array of menulinks that belong to the menu with given title

page($slug or $id) : Returns the given page with this slug or id