PHPackages                             phpsa/datastore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. phpsa/datastore

ActiveLibrary[Database &amp; ORM](/categories/database)

phpsa/datastore
===============

A datastore

05PHP

Since Jul 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/phpsa/datastore)[ Packagist](https://packagist.org/packages/phpsa/datastore)[ RSS](/packages/phpsa-datastore/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Datastore
=========

[](#datastore)

[![Build Status](https://camo.githubusercontent.com/b0ba38cb701399af633b0b1ecee0568cd1e2092c764815c77a996294bd3d3886/68747470733a2f2f7472617669732d63692e6f72672f70687073612f6461746173746f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phpsa/datastore)[![styleci](https://camo.githubusercontent.com/4499ec3a0efa386c7581f730bb44592bf518dc156779fc92c663dd51908cfb92/68747470733a2f2f7374796c6563692e696f2f7265706f732f4348414e47454d452f736869656c64)](https://styleci.io/repos/CHANGEME)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/aac142d799d27361d5371a16e4e22a349acc46e3f4cf959c98f6baefa9d1cbe9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687073612f6461746173746f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phpsa/datastore/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/eed2863b983f7ba4403c00c67aa213ff0fc1f6f07624d603255c231d3beff577/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f4348414e47454d452f6d696e692e706e67)](https://insight.sensiolabs.com/projects/CHANGEME)[![Coverage Status](https://camo.githubusercontent.com/3a2923f5f7c385d94282c0509c7b42b9de4460a470f22ad6f2174675d35f487b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f70687073612f6461746173746f72652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/phpsa/datastore?branch=master)

[![Packagist](https://camo.githubusercontent.com/3024c4e60b6c16f789068eb55bc6fe6cab1c8d88fc33b8f5d9f384ce2ab7402c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687073612f6461746173746f72652e737667)](https://packagist.org/packages/phpsa/datastore)[![Packagist](https://camo.githubusercontent.com/e30ede933f8aa0c89f88874032959a7a54582c200d0ac8efe94c0ccf657e2e7e/68747470733a2f2f706f7365722e707567782e6f72672f70687073612f6461746173746f72652f642f746f74616c2e737667)](https://packagist.org/packages/phpsa/datastore)[![Packagist](https://camo.githubusercontent.com/ec99a6a27f94a3fe3f0ee4d2519f548f89e433e97e801aca9dfcec3d80e96d91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70687073612f6461746173746f72652e737667)](https://packagist.org/packages/phpsa/datastore)

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](https://github.com/rappasoft/laravel-5-boilerplate) however should be able to work independantly (another package may be built to deal with this if there is any demand)

Installation
------------

[](#installation)

Install via composer

```
composer require phpsa/datastore
```

### Register Service Provider

[](#register-service-provider)

**Note! This and next step are optional if you use laravel&gt;=5.5 with package auto discovery feature.**

Add service provider to `config/app.php` in `providers` section

```
Phpsa\Datastore\ServiceProvider::class,
```

### Register Facade

[](#register-facade)

Optionally Register package facade in `config/app.php` in `aliases` section

```
Phpsa\Datastore\Facades\Datastore::class,
```

### Publish Configuration/Translations/Js/scss File

[](#publish-configurationtranslationsjsscss-file)

```
php artisan vendor:publish --provider="Phpsa\Datastore\ServiceProvider"
```

Adding to `rappasoft/laravel-5-boilerplate`
-------------------------------------------

[](#adding-to-rappasoftlaravel-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
---------------------

[](#configuration-options)

- *`assets`* - Which content assets are enabled
- *`urlprefix`* - url prefix (default ams) to prefix the content asset path with

Default Assets
--------------

[](#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 &amp; Body
- *`BlockAsset`* 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
------------------

[](#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
------------------

[](#property-reference)

KeyRequiredTypeDetails**name**YesStringPublic name of the element rendered as the form label**type**YesStringType of asset being used: one of the default properties or your custom one.**required**NoBooleanDefault true, set to false if the field is an optional field**help**NoStringHelptip for your input field**options**Yes \*ArrayOnly used on: *DROPDOWN*, *AUTOCALLBACK* &amp; *AUTOCALLBACKADDER*, holds the array of options for the select dropdown**callback**Yes \*String/ArrayOnly used on: *AUTOCALLBACKADDER*, *AUTOCALLBACK*, *AUTOCOMPLETE*, holds the callback url string or array format \['url' =&gt; 'url/endpoint', 'method'=&gt; '(post/get)'\]Asset Reference (Content Item)
------------------------------

[](#asset-reference-content-item)

All asset classes extend the `Phpsa\Datastore\Ams\Asset` Class. Available class properties / methods are set as follows

PropertyVisibilityTypeRequiredDefaultDescriptionnamepublicStringYesFriendly Name of the component - publicshortnamepublicStringYeaShort name (unique) for teh component use for internal referenceprivatepublicBooleanNofalseWhether will be a public faeing component - true disabled page &amp; slug sectionchildrenpublicStringNonullLinks to another asset type as a set of childrenis\_childpublicbooleannofalseIs child - is this a child asset, -- this will forceably hide it from the list - usefull for private assetsacceptpublicStringNonullAsset that can be assigned to the asetaccept\_limitpublicIntNonullSet to 1 or higher to limit, null = unlimitedmax\_instancespublicIntNo0Max number of assets of the type that can be generated.value\_equalspublicStringYesWhich property is the main identifiernamespacepublicStringYes'asset'typepublicStringYes'asset`propertiespublicArrayNoarraymeta\_descriptionpublicStringNonullSet to off to disable this, any other string will be the default for the formmeta\_keywordspublicStringNonullSet to off to disable this, any other string will be the default for the formpage\_csspublicStringNonullSet to off to disable this, any other string will be the default for the formpage\_jspublicStringNonullSet to off to disable this, any other string will be the default for the formstatus\_equalspublicStringNonullset to the property key which will be controlling your publish statusstart\_datepublicStringNonullset this to the property key to which will be containing this valueend\_datepublicStringNonullset this to the property key to which will be containing this valuecomment\_equalspublicStringNonullset this to the property key to which will be containing this valueStatic MethodParamsRequiredDescriptionaboutnoneYesthis hold teh about information on the assetrouteDatastorePages $page, $routeNothis will allow you to set the route for the public urlvalueEquals$valueNoThis allows you to format the value for display on the frontend, value passed is the value from the record.html$dataYes (property)Required for a property, returns the pre-formatted response for the asset type### List of Available AMS Assets:

[](#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
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [](https://github.com/phpsa/datastore)
- [All contributors](https://github.com/phpsa/datastore/graphs/contributors)

This package is bootstrapped with the help of [melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbe4c97ef26aca9d6792775ea44a4c83215881b158f2d3894279c7b73bedda3c?d=identicon)[phpsa](/maintainers/phpsa)

---

Top Contributors

[![craigAtCD](https://avatars.githubusercontent.com/u/152445143?v=4)](https://github.com/craigAtCD "craigAtCD (18 commits)")

### Embed Badge

![Health badge](/badges/phpsa-datastore/health.svg)

```
[![Health](https://phpackages.com/badges/phpsa-datastore/health.svg)](https://phpackages.com/packages/phpsa-datastore)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
