mortezaa97/factors
最新稳定版本:v1.0.1
Composer 安装命令:
composer require mortezaa97/factors
包简介
关键字:
README 文档
README
A comprehensive Filament plugin for managing invoices/factors and their items with support for multiple types, barcode scanning, label printing, and more.
Features
- 🧾 Complete Invoice Management: Create, edit, and manage invoices with multiple types
- 📦 Item Management: Add products to invoices with automatic calculations
- 🔍 Barcode Scanning: Built-in barcode scanner for quick product addition (F1 key)
- 🏷️ Label Printing: Generate customizable product labels
- 📄 Invoice Printing: Professional invoice templates
- 🔐 Authorization: Built-in policies for secure access control
- 🌐 API Ready: RESTful API endpoints for all resources
- 🇮🇷 Persian Support: Full RTL and Persian language support
Installation
1. Require the package via Composer
composer require mortezaa97/factors
2. Register the Plugin
In your app/Providers/Filament/AdminPanelServiceProvider.php:
use Mortezaa97\Factors\FactorsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FactorsPlugin::make(), ]); }
3. Run Migrations
php artisan migrate
4. Clear Caches
php artisan config:clear php artisan cache:clear
Configuration
Publish the configuration file:
php artisan vendor:publish --tag="factors-config"
Publish migrations:
php artisan vendor:publish --tag="factors-migrations"
Publish views (for label and invoice customization):
php artisan vendor:publish --tag="factors-views"
Usage
See PLUGIN_USAGE.md for detailed usage instructions.
Quick Example
use Mortezaa97\Factors\Models\Factor; // Create a factor $factor = Factor::create([ 'customer_id' => $userId, 'type' => 1, // Sale 'date_time' => now(), 'total_price' => 100000, 'created_by' => auth()->id(), ]); // Add items $factor->items()->create([ 'model_type' => 'App\\Models\\Product', 'model_id' => $productId, 'count' => 2, 'unit_price' => 50000, ]);
Available Routes
- Filament Admin Panel: Automatic resource registration
- API:
/api/factors,/api/factor-items - Print:
/factors/{id}/labels,/factors/{id}/invoice
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-06