Download the PHP package madebyclowd/laravel-auto-sequence without Composer

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

Laravel AutoSequence

Latest Version on Packagist Total Downloads run-tests security codecov

This package makes numbers for your Laravel models, like INV-2026-0001 or ORD-999. Each new number is bigger than the last one.

It works on its own. Two records never get the same number, even if thousands of people place an order at the exact same second.

Why not just use the model's id?

The database id (1, 2, 3...) is fine inside your app. But don't show it to your users. Here is why:

  1. It leaks data. Your customers can guess how many orders or invoices you have.
  2. It is unpredictable. On your computer it may start at 1. On the live server it may start at 14,000. You can't control it.
  3. It is boring. You can't add the year, a branch code, or your own prefix. You can't turn id = 5 into INV-2026-NY-0005.

This package makes a separate, nicer number for you, like invoice_number. It also makes sure two requests at the same time never get the same number.

Where teams actually use this

Full examples with config for each: Real-World Use Cases.

Quick Start

Follow these steps in order. This example numbers an Invoice model.

Step 1: Install the package

Step 2: Run the setup command

It asks a few yes/no questions. Press Enter each time to pick the normal answer. It creates two small database tables the package needs.

Step 3: Add a number column to your table

Make a new migration for the table you want to number (here, invoices):

Open that new migration file and add one line inside the up() method:

Run the migration:

Step 4: Tell the model to use the package

Open your model file (app/Models/Invoice.php). Add implements Sequenceable to the class, and use HasSequenceNumber; inside it:

Step 5: Describe how the number should look

Still inside the Invoice class, add a getSequenceConfig() method:

What each line means:

Step 6: Create a record

Done. Every new Invoice now gets a safe number that goes up by itself.

Features

Requirements

Documentation

The docs/ folder covers every feature step by step:

License

The MIT License (MIT). Please see the LICENSE file for more information.


All versions of laravel-auto-sequence with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.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 madebyclowd/laravel-auto-sequence contains the following files

Loading the files please wait ...