Download the PHP package orchid/cms without Composer
On this page you can find all versions of the php package orchid/cms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cms
CMS package for Laravel Orchid Platform
This package is looking for a maintainer! If you want to be one, write to the mail [email protected]
Content Management System Entities
The entity is the main part of the Press content management system. Instead of generating a CRUD for each model, you can select any object in a separate type and easily manage it. Essence only applies to models based on 'Post', as it is the base for typical data.
It would help if you described the fields you want to receive and in what form, and its CRUD will be built by itself.
You can create an entity using the commands:
To display an entity to a user, you must endow it or group (roles) with the necessary rights using the graphical interface.
The type looks like this:
You can extend the datatype with all available methods, to add new functionality to it that suits your application.
Mesh modification
The data you want to display in the grid can be changed by passing an array with a name and a function instead of a key-value, where the passed parameter is the original data slice.
Posts
The press assumes that by default, any elements containing site data are the Post
model.
This structure is suitable for most public websites as their structure is very similar.
Such as:
- News,
- Promotions,
- Pages,
- Vacancies
You can think of hundreds of variations. In order not to use almost identical models
and migration uses the basic Post
model. It uses the JSON type for columns, so
much more convenient and simpler than the EAV format. Also, it allows for translation.
We have specially reproduced some approaches with WordPress for Laravel, which will allow you to be more efficient.
Getting data
So now you can get the database data:
Being able to store localization in JSON does not mean that you have to fill in all values. For example, a record of information about a bar, it can be in Russian and English, but the number of seats
will not change for any language. Accordingly, it makes no sense to duplicate such parameters but put them in the options
.
Single table inheritance
If you choose to create a new class for your custom post type, you can return that class for all instances of that post type.
The definition of write behavior is based on the specified type
.
Taxonometry
You can get taxonometry for a specific post, for example:
Or, you can search for records using your taxonomy:
More complex forms are possible, for example, get all entries from the main
category including its child categories:
Remember that such records may be less efficient in sampling rate and are given as an example.
Categories and Taxonometry
You can use the following methods to retrieve a category, taxonometry, or record from a specific category:
Attachments
Attachments are files related to a recording. These files can be of different formats and resolutions.
Full text search
To use full text search, you need to add a new method to your behavior class:
It will accept all model data, and return elements that are required for indexing.
Let's take the standard “DemoPost.php” for example, it has many parameters, but really, we only need two:
- Article title
- The content of the article
To do this, we must return them:
We returned all data in English, with a zip code.
To import, it remains only to apply the command:
Now we can use search in our projects:
Tags
Tag (tag) - a word or phrase that can unite a group of text, images, etc. on a topic
Tags can be connected to all created models using the trait
In the Post
model, it is included by default, so examples will be on it.
In this section, we'll show you how you can manage your tag subjects.
Removes one or more tags from an object via an array or an entity-delimited string.
This method is very similar to the tag()
method, but it combines untag()
to automatically identify the tags to add and remove. This is a beneficial technique when running an update on subjects, and you don't want to deal with checks to check which tags should be added or removed.
We have some methods to help you get all the tags attached to an object and do the opposite and get all the objects with the given tags.
Comments
Comments are a required attribute for some types of websites. Thanks to them, users can express their opinion on any record, support or refute the opinions expressed, conduct a dialogue with other users.
Comments are attached to Post entries
Relationship
Checks
Menu
The package includes an easy-to-use mechanism for creating custom menus (navigation), using drag & drop and localization support.
Configuration
Most of the menus are displayed at the top of the site,
but the location may be different for different applications,
the number of menus is limited and defined in the configuration file config/press.php
Model
The Menu class is a regular Eloquent
model, all its capabilities are available to it,
for example, to display only parent menu items with child links
and taking into account localization, it is necessary:
Methods available:
License
The MIT License (MIT). Please see License File for more information.