Download the PHP package ervinne/nw-cms-version without Composer

On this page you can find all versions of the php package ervinne/nw-cms-version. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nw-cms-version

NuWorks CMS Model Version Control

This package enables tagging in Laravel models called versions. Versions allow different values at specified fields in a model.

Installation

Require the package in your composer.json and update your dependencies:

`

Then add the service provider in your config/app.php providers array:

`

Register Commands

To allow the command for generating migrations out of models to be version controlled, add the GenerateCMSVersionMigrations class to the App\Console\Kernel $commands property:

Configurations

You can set which models to "Version Control" on the config/cms-versions.php configuration file. Publish the config to create this configuration file. Note that you will need to publish as well to generate the required javascript files when you want to reflect version data on an already displaying form (more on that later):

`

Set which models you want to version control in the config/cms-versions.php

Where table, primary_key, classpath is the table, primary key, and class path of the model you want to version control. is_published_field is the name of the field you want to version control inside that model, ex: is_published, is_active, etc. is_published_value is the value that needs to be set to consider the field as "published", is_unpublished_value is vice versa.

In case you want to version control multiple fields in 1 model, just duplicate the model entries in the models array with the same table, primary_key, and classpath.

Migrating the Models

To enable version control on the models, the user must migrate after configuration with the following command:

`

This will create a migration called create_cms_version_pivot_tables that will contain database changes based on the configuration in config/cms-versions.php. Migrate afterwards using the command:

`

Model Setup

Use the trait VersionControlled in your model to enable versioning functionalities:

Saving Model to a Version

Before you save a model, you need to save a version to save it to first:

Save your model by specifying the id of the saved CMSVersion object in the model's version_id field then save using the method saveWithVersion().

Version Status

Version status can be any string you want but "Published" is reserved and is set to signify that the version is the currently used version. If you try to save version controlled fields to a model set to a version that's not published then those changes wont save on the model itself but will be put in the version records only. If a version with model data is set to published it's data will be updated to the respective models.


All versions of nw-cms-version with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
laravel/framework Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ervinne/nw-cms-version contains the following files

Loading the files please wait ....