Download the PHP package sausin/laravel-set-autoincrement without Composer

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

Laravel package to set custom Auto Increment in database

Latest Version on Packagist Total Downloads Quality Score License: MIT

Wanted to easily set the starting ID for your models? This package makes it easy as a breeze! It's also possible to change auto increment on existing databases (i.e. new entries will start from the specified number).

Installation

Run the below command in your Laravel project root.

This will install the latest version of the package for you. The service provider will automatically register and make available the features of the package (which work automatically).

Configuration

The default configuration will set the package such that except a few tables, the AUTO_INCREMENT counter will be set at 100001 (one hundred thousand and one).

To change the starting value and the tables affected by it, the configuration can be published using

and then the option which corresponds to Sausin\DBSetAutoIncrement\AutoIncrementServiceProvider needs to be selected. This will add a config named auto-increment.php in your project's config folder.

Change the values as desired.

Usage

Default Behavior

It will run every time migrations are finished running, whether for the first time or incremental. All tables where the AUTO_INCREMENT value is higher than the value in the config will be left alone. Changes will be made in all the rest.

If, however, automatic updation behaviour is not desired, the action key in the config file can be changed to manual and the package will not take automatic action.

Command line

Using the below command

the auto increment value can be changed manually. Multiple tables are accepted as input.

Supported SQL Drivers

Currently mysql and sqlite are supported. Plan to have support for more drivers in future.


All versions of laravel-set-autoincrement with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
doctrine/dbal Version ^2.10
illuminate/support Version ^5.8|^6.0|^7.0|^8.0
illuminate/contracts Version ^5.8|^6.0|^7.0|^8.0
illuminate/database Version ^5.8|^6.0|^7.0|^8.0
illuminate/queue Version ^5.8|^6.0|^7.0|^8.0
illuminate/events Version ^5.8|^6.0|^7.0|^8.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 sausin/laravel-set-autoincrement contains the following files

Loading the files please wait ....