PHPackages                             frikishaan/autonumber-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. frikishaan/autonumber-laravel

AbandonedArchivedLibrary

frikishaan/autonumber-laravel
=============================

Generate Autonumbers for your Laravel Models

1.0.0(4y ago)210MITPHPPHP ^7.4|^8.0

Since Nov 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/frikishaan/autonumber-laravel)[ Packagist](https://packagist.org/packages/frikishaan/autonumber-laravel)[ Docs](https://github.com/frikishaan/autonumber-laravel)[ RSS](/packages/frikishaan-autonumber-laravel/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Generate Autonumbers for your Laravel Model
===========================================

[](#generate-autonumbers-for-your-laravel-model)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b96faa3e3d7fb4924bfc5ed2d79ad4d988521e71ad92ffa0956c5f300f3a20d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672696b69736861616e2f6175746f6e756d6265722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frikishaan/autonumber-laravel)[![Total Downloads](https://camo.githubusercontent.com/8cb5e0a4745be43ee54a0c20895345bdc31ae5e00937a5b69b130e18011eb134/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6672696b69736861616e2f6175746f6e756d6265722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frikishaan/autonumber-laravel)[![GitHub Actions](https://github.com/frikishaan/autonumber-laravel/actions/workflows/main.yml/badge.svg)](https://github.com/frikishaan/autonumber-laravel/actions/workflows/main.yml/badge.svg)[![StyleCI](https://camo.githubusercontent.com/c84c7e8811fd64c830821f7751ee868c16c6d65a784cc9608962bead82eed6fb/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3433333131323234302f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/433112240?branch=main)[![License](https://camo.githubusercontent.com/63aef6cad3156979d9c3407ef53524c6e0e0a655850c2b32ad66feebe20f053a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6672696b69736861616e2f6175746f6e756d6265722d6c61726176656c3f7374796c653d666c61742d737175617265)](LICENSE.md)

This package can help you in creating autonumbers for your laravel model. You can create autonumbers using the artisan command, and it will generate the autonumber whenever you create a record using your model.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require frikishaan/autonumber-laravel
```

Usage
-----

[](#usage)

First you have to run migration. It will create a table in your database named `autonumbers`.

```
php artisan migrate
```

Then use the below command to create autonumber -

```
php artisan autonumber:create
```

Use the `HasAutonumber` trait in your model. It will generate the autonumber when you create a record using your model.

```
