定制 azaharizaman/laravel-backoffice 二次开发

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

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

azaharizaman/laravel-backoffice

最新稳定版本:v1.0.1

Composer 安装命令:

composer require azaharizaman/laravel-backoffice

包简介

A Laravel package for managing hierarchical company structures, offices, departments, staff, and units

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A comprehensive Laravel package for managing hierarchical company structures, offices, departments, staff, and organizational units. This package provides a complete backend solution for complex organizational management without any UI components.

Features

Hierarchical Company Structure

  • Parent-Child Companies: Support for multi-level company hierarchies
  • Office Management: Physical office structures with hierarchical relationships
  • Department Management: Logical department hierarchies
  • Staff Management: Employee assignment to offices and/or departments
  • Unit Management: Logical staff groupings with unit group organization

Key Capabilities

  • Multi-Hierarchy Support: Both physical (offices) and logical (departments) hierarchies
  • Flexible Staff Assignment: Staff can belong to offices, departments, or both
  • Unit Organization: Staff can belong to multiple units within unit groups
  • Organizational Charts: Comprehensive reporting line management with chart generation
  • Export Capabilities: JSON, CSV, and DOT (Graphviz) export formats
  • Office Types: Configurable office type categorization
  • Model Factories: 🆕 Comprehensive factories for all models with rich states for testing
  • Comprehensive Policies: Built-in authorization policies
  • Observer Patterns: Automatic event handling for data changes
  • Console Commands: Management utilities via Artisan commands

Requirements

  • PHP 8.2+
  • Laravel 11.0+ or 12.0+

Installation

You can install the package via composer:

composer require azaharizaman/backoffice

Publish and run the migrations:

php artisan vendor:publish --provider="AzahariZaman\BackOffice\BackOfficeServiceProvider" --tag="backoffice-migrations"
php artisan migrate

Optionally, you can publish the config file:

php artisan vendor:publish --provider="AzahariZaman\BackOffice\BackOfficeServiceProvider" --tag="backoffice-config"

Quick Start

use AzahariZaman\BackOffice\Models\{Company, Office, Staff};
use AzahariZaman\BackOffice\Helpers\OrganizationalChart;

// Create organizational structure using factories
$company = Company::factory()->create(['name' => 'Acme Corp']);
$office = Office::factory()->for($company)->create();

// Create hierarchical staff structure using factories
$ceo = Staff::factory()->ceo()->inOffice($office)->create();
$manager = Staff::factory()->manager()->withSupervisor($ceo)->create();
$employee = Staff::factory()->withSupervisor($manager)->create();

// Generate organizational chart
$chart = OrganizationalChart::forCompany($company);
$stats = OrganizationalChart::statistics($company);

// Export chart data
$csvData = OrganizationalChart::export($company, 'csv');

See the documentation for detailed usage instructions.

Documentation

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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固