Download the PHP package armincms/option without Composer

On this page you can find all versions of the php package armincms/option. 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 option

Option

A key-value storage for laravel

Table of Contents

Introduction

Armincms Option is a package for store key-value. with this package, you can store values by key and tag in the simplest way into multiple storages.

Installation

To get started with Armincms Option, first run:

Then publish configuration:

This command publishes config and migration file into the appropriate path.

Configuration

This package supports file and database storage for storing data. The default storage is file. for change the storage type you have two way:

Attention 1: if you want use database storage you should run php artisan migrate in console.

Attention 2: For access to option-manager by laravel container you can use app('armincms.option')

Attention 3: For simple coding: you can use helper option() insteadof app('armincms.option')

Single Storing

There exists two way for storing single data:

Mass Storing

For mass storing data use the followings method:

option()->putMany([
    key1 => value1,
    key2 => value2,
])  

Grouped Data

For grouping many option, can pass tag parameter when storing a data:

app('armincms.option')->put(key, value, tag)

Also; it's possible to attach a tag into data when mass storing:

app('armincms.option')->putMany([
    key1 => value1,
    key2 => value2,
], tag)

Retrieving

There exist many ways to retrieve your data.you can retrieve your data, single or multiple.

single retrieving:

To retrieve an option, you can use option()->key. but if you need default value for missed values; you can use option(key, default) or option()->get(key, default) .

multiple retrieving:

Also, retrieving multiple options is not difficult. you can retrieve many values by its keys with the many method; like option()->many(keys). If you need default value for missed values; you can pass an associative array of keys and default values; like following:

And you can retrieve tagged values with option()->tag(tag).

Retrieving From Other Storage

For store an option into none default driver with assumption that default driver is database; follow this:

app('armincms.option')->store('file')->put(key, value, tag)
app('armincms.option')->store('file')->many([key1, key2], tag)

For retrieve you can use this:

app('armincms.option')->store('file')->get(key, default)
app('armincms.option')->store('file')->tag(tag) 
app('armincms.option')->store('file')->many(keys)  

Check For Existence

If you want to check for existance of an option ; you can use helper option_exists(key) or option()->has(key).


All versions of option with dependencies

PHP Build Version
Package Version
No informations.
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 armincms/option contains the following files

Loading the files please wait ....