phpsa / datastore
A datastore
Requires
- php: >=7.0
- intervention/image: ^2.4.0
Requires (Dev)
- orchestra/testbench: ~3.7.0
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-11-12 16:26:24 UTC
README
Package description: Content Asset Management System (CAMS) Datastore package for a simplistic yet powerfull and extendable CMS for Laravel 5.8 and up
Package was developed over Laravel-5-boilerplace however should be able to work independantly (another package may be built to deal with this if there is any demand)
Installation
Install via composer
composer require phpsa/datastore
Register Service Provider
Note! This and next step are optional if you use laravel>=5.5 with package auto discovery feature.
Add service provider to config/app.php
in providers
section
Phpsa\Datastore\ServiceProvider::class,
Register Facade
Optionally Register package facade in config/app.php
in aliases
section
Phpsa\Datastore\Facades\Datastore::class,
Publish Configuration/Translations/Js/scss File
php artisan vendor:publish --provider="Phpsa\Datastore\ServiceProvider"
Adding to rappasoft/laravel-5-boilerplate
Add
@include('phpsa-datastore::backend.sidebar')
to resources/views/backend/includes/sidebar.blade.php
where you would like the content managemtn menu to appear.
Configuration Options
assets
- Which content assets are enabledurlprefix
- url prefix (default ams) to prefix the content asset path with
Default Assets
Each page type is called an Asset, Each Asset can have 1 or more Properties, along with children and accepted keys to allow joining 1 or more asset types together
The Default package is shipped with the following:
ContentAsset
Default page type, with a Title & BodyBlockAsset
Simplistic Non-page asset this will allow you to add to a standard view to allow managing prebuilt content in non CMS pages (ie login / register / contact pages)TabsAsset
Tab view asset, allows you to build a page with tabbed content blocks.- *
ArticleCategoryAsset
Categories for ArticleItemsAssets ArticleItemAsset
Article Items that can be assigned to articleCategoryAsset(s)
Default Properties
::AUTOCALLBACKADDER
- AutoComplete add list of items to be referenced via an ajax callback with an selectable option::AUTOCALLBACK
- AutoComplete add a single to be referenced via an ajax callback with a selction option::AUTOCOMPLETE
- Standardised Autocomplete::BOOL
- On off swith for the form::DATEPICKER
- Renders an input type date::DROPDOWN
- renders a dropdown::FILE
- File upload::HEADING
- Heading property default render with an h2::HTML
- Html WYSIWYG area::IDENTITY
- Autocomplete linked to Users List to assign n author to a for example::IMG
- Image uploader::METATEXT
- Internal mainly - allows for description / keywords header options,::STRING
- standard text input::SUBHEADING
- SubHeading text input - default render wiht an h3::TEXT
- textarea input
Property Reference
Asset Reference (Content Item)
All asset classes extend the Phpsa\Datastore\Ams\Asset
Class. Available class properties / methods are set as follows
List of Available AMS Assets:
- BladeDirective
@forDatastores(true)
...@endforDatastores
returns grouped array (false) will return a single tree list. Phpsa/Datastore/Helpers::getAssetList(true||false)
within php code
Security
If you discover any security related issues, please email instead of using the issue tracker.
Credits
This package is bootstrapped with the help of melihovv/laravel-package-generator.