Download the PHP package enea/laravel-sequenceable without Composer

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

Laravel Sequenceable Package

Build Status

Laravel Sequenceable is a library to generate and manage sequences for laravel models.

Installation

Laravel Sequenceable requires PHP 8.1.

To get the latest version, simply require the project using Composer:

Once installed, if you are not using automatic package discovery, then you need to register the Enea\Sequenceable\SequenceableServiceProvider service provider in your config/app.php.

Now. Publish the configuration file.

And finally run migrations.

Basic Usage

Getting started with the library is as simple as using the Sequenceable trait and implementing the SequenceableContract interface, after that you only need to specify the sequences you want to generate.

Advanced

We exemplify all the options to generate a sequence with the case of a payment document.

List

To retrieve all the sequences of a model, you can use the Enea\Sequenceable\Facades\Succession facade which is linked to the Enea\Sequenceable\Succession class.

This returns an instance of Enea\Sequenceable\SequenceCollection . With which you can do things like:

Config

You can change the default sequence model of config\sequenceable.php in the model key.

Or explicitly specify the model you want to use with certain fields, you can achieve this from the configuration of the sequences in your model.

Customize

if you already have a model to store your sequences, you need to implement the Enea\Sequenceable\Contracts\SequenceContract interface, or extend the default model Enea\Sequenceable\Model\Sequence.

In case you have your own sequence model, there are some fields that you should store in its sequence table:

  1. The column ID, and this is obtained by concatenating the column name and scope.
  2. The name of the table to which the sequence belongs.
  3. An integer type sequence.

Example

To better exemplify this, we will use the default Sequence model.

This model comes with a default configuration.

id sequence source column_id created_at updated_at
e4910d63 1 documents document_number.invoce 2020-07-03 18:40:44 2020-07-03 18:40:44

Migration

The table structure has the required fields, you can see the migration in CreateSequencesTable

Column Description Required
id It is generated on the basis of the union of the table, column and scope :x:
sequence Stores the last value in the sequence :white_check_mark:
source Stores the table name :white_check_mark:
column_id Concatenated name and scope :white_check_mark:
created_at Indicates the date and time the sequence was created :x:
updated_at Indicates the last time the sequence is updated :x:

You can see another example of this in the test folder and look for the files CustomSequence.php and migrations/2017_04_23_200525_create_custom_sequences_table.php

More documentation

You can find a lot of comments within the source code as well as the tests located in the tests directory.


All versions of laravel-sequenceable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^10.21|^v11.15
vaened/php-sequence-generator Version ^2.0.0
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 enea/laravel-sequenceable contains the following files

Loading the files please wait ....