定制 shan016/laravel-autonumber 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shan016/laravel-autonumber

最新稳定版本:v2.0.0

Composer 安装命令:

composer require shan016/laravel-autonumber

包简介

Laravel package to create autonumber for Eloquent model

README 文档

README

We’re excited to introduce v2.0 of Laravel AutoNumber! This release brings improved compatibility, cleaner integration, and alignment with modern Laravel standards.

✨ What’s New

  • Full support for Laravel 10
  • Updated for PHP 8.1+
  • Improved stability and performance
  • Cleaner integration with Eloquent model lifecycle
  • Enhanced support for dynamic formats using closures

💥 Breaking Changes

  • Dropped support for:

    • Laravel 8
    • Laravel 9
    • PHP versions below 8.1

If you are using Laravel 8 or 9, please continue using v1.x

🔄 Upgrade Guide

  1. Update the package:

    composer require shan016/laravel-autonumber:^2.0
  2. (Optional) Republish configuration:

    php artisan vendor:publish --provider="Shan016\AutoNumber\AutoNumberServiceProvider" --force
  3. Run migrations:

    php artisan migrate
  4. Verify your model:

    • Uses AutoNumberTrait
    • Implements getAutoNumberOptions()

🧪 Example

$order = Order::create([
    'customer' => 'John Doe',
]);

echo $order->order_number;

// Example output: SO-00001

📦 Installation (Fresh)

composer require shan016/laravel-autonumber:^2.0

🙌 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

⭐ Support

If you find this package useful, consider giving it a ⭐ on GitHub!

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固