Generate auto numbers for your Laravel Model.

Overview

Generate Autonumbers for your Laravel Model

Latest Version on Packagist Total Downloads GitHub Actions StyleCI License

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

You can install the package via composer:

composer require frikishaan/autonumber-laravel

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.

<?php

namespace App\Models;

use Frikishaan\Autonumber\Traits\HasAutonumber;
use Illuminate\Database\Eloquent\Model;

class Invoice extends Model
{
    use HasAutonumber;

    protected $fillable = [
        'customer', 'amount',
    ];
}

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.


This package was generated using the Laravel Package Boilerplate.

You might also like...
A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own...

PHPMVC A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own... How to Start Clone this repo - git clone https:/

基于 swoole 的多进程队列系统,低延时(最低毫秒级)、低资源占用, 支持一键化协程、超时控制、失败重试。可与 laravel thinkphp 等框架配合使用
基于 swoole 的多进程队列系统,低延时(最低毫秒级)、低资源占用, 支持一键化协程、超时控制、失败重试。可与 laravel thinkphp 等框架配合使用

multi-process-queue 基于swoole的多进程队列系统,manage进程管理子进程,master进程监听队列分发任务,worker进程执行任务, 多进程、低延时(最低毫秒级)、低资源占用。可与 laravel thinkphp 等框架配合使用 版本要求: php=7.1 swoo

A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.
A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire.

Malzahar A magic PHP framework. Build reactive web apps without writing HTML, CSS, or JavaScript! Powered by Tailwind, Alpine, Laravel, & Livewire. Re

I made my own simple php framework inspired from laravel framework.

Simple MVC About Since 2019, I started learning the php programming language and have worked on many projects using the php framework. Laravel is one

Awesome tips for Laravel

Awesome tips for Laravel

An intelligent code generator for Laravel framework that will save you time

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many of the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.

A modified version of the Laravel Framework

Hexavel Framework Hexavel is a restructured version of Laravel, with the purpose of providing better work flows which will simplify the development pr

RoadRunner ⇆ Laravel bridge
RoadRunner ⇆ Laravel bridge

RoadRunner ⇆ Laravel bridge Easy way for connecting RoadRunner and Laravel applications. 🐋 If you want to see an example of a laravel application in

Laravel 5 nested category/menu generator

Laravel 5 Nestable Laravel Nestable to work with recursive logic. Category level there is no limit but this may vary depending on your server performa

Releases(1.0.0)
Owner
Ishaan
Full stackoverflow Software Engineer💻, quick learner, like to explore technologies.
Ishaan
This package provides some basic methods to implement a self updating functionality for your Laravel application. Already bundled are some methods to provide a self-update mechanism via Github or some private repository via http.

This package provides some basic methods to implement a self updating functionality for your Laravel 5 application. Already bundled are some methods to provide a self-update mechanism via Github.

Holger Lösken 311 Dec 31, 2022
Supercharge your Laravel application's performance.

Introduction Laravel Octane supercharges your application's performance by serving your application using high-powered application servers, including

The Laravel Framework 3.3k Jan 1, 2023
A set of ready-made regex helper methods for use in your Laravel application.

Regex A set of ready-made regex helper methods for use in your Laravel application. Installation composer require hotmeteor/regex Usage Regex comes wi

Adam Campbell 229 Dec 25, 2022
This package provides a high performance HTTP server to speed up your Laravel/Lumen application based on Swoole.

This package provides a high performance HTTP server to speed up your Laravel/Lumen application based on Swoole.

Swoole Taiwan 3.9k Jan 8, 2023
Bugsnag notifier for the Symfony PHP framework. Monitor and report errors in your Symfony apps.

Bugsnag exception reporter for Symfony The Bugsnag Notifier for Symfony gives you instant notification of errors and exceptions in your Symfony PHP ap

Bugsnag 43 Nov 22, 2022
a framework for WebDevelop based on the mvc structure. The name of this project for Fun because everyone can use it. Completely simple and powerful structure for all your projects

A_A (-.-) ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ |-| █▄─▄▄─█▄─██─▄█─▄▄▄▄█─▄▄▄▄█▄─█─▄█─▄▄▄─██▀▄─██─▄

MasihGhaznavi 7 Jun 29, 2022
A easy way to install your basic yii projetc, we have encrypt database password in phpfile, my class with alot funtions to help you encrypt and decrypt and our swoole server install just run ./yii swoole/start and be happy!

Yii 2 Basic Project Template with swoole and Modules Yii 2 Basic Project Template is a skeleton Yii 2 application best for rapidly creating small proj

null 3 Apr 11, 2022
With this extension you can share data from your web pages to any social network!

Extension for sharing on social networks With this extension you can share data from your web pages to any social network! Features: SEO support, defa

Yii Maker 50 Oct 15, 2022
This repository contains a library of optional middleware for your Slim Framework application

Slim Framework Middleware This repository contains a library of optional middleware for your Slim Framework application. How to Install Update your co

Slim Framework 47 Nov 7, 2022
Silex Skeleton - a fully-functional Silex application that you can use as the skeleton for your new applications

Silex Skeleton - a fully-functional Silex application that you can use as the skeleton for your new applications

Silex 789 Dec 5, 2022