PHPackages                             azaharizaman/laravel-backoffice - 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. [Admin Panels](/categories/admin)
4. /
5. azaharizaman/laravel-backoffice

ActiveLibrary[Admin Panels](/categories/admin)

azaharizaman/laravel-backoffice
===============================

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

v1.0.1(6mo ago)226MITPHPPHP ^8.2CI passing

Since Oct 31Pushed 6mo agoCompare

[ Source](https://github.com/azaharizaman/laravel-backoffice)[ Packagist](https://packagist.org/packages/azaharizaman/laravel-backoffice)[ RSS](/packages/azaharizaman-laravel-backoffice/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Backoffice Laravel Package
==========================

[](#backoffice-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ba9e6d4ae26141cc9075155d91e7fcdca47f384b63449d8f618976672c38b409/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617a61686172697a616d616e2f6c61726176656c2d6261636b6f66666963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azaharizaman/laravel-backoffice)[![GitHub Tests Action Status](https://github.com/azaharizaman/laravel-backoffice/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/azaharizaman/laravel-backoffice/actions)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/51cbc3047e813001cd85e02b0a795e99e1ae71bc12dd951de8f3e410493ba0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f617a61686172697a616d616e2f6c61726176656c2d6261636b6f66666963652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/azaharizaman/laravel-backoffice/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/895f02e17d21a748be76fb25baabafcd862738103a269dc25f43ce4f02fcd78c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617a61686172697a616d616e2f6c61726176656c2d6261636b6f66666963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/azaharizaman/laravel-backoffice)

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
--------

[](#features)

### Hierarchical Company Structure

[](#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

[](#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
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.0+ or 12.0+

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

[](#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
-----------

[](#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](docs/README.md) for detailed usage instructions.

Documentation
-------------

[](#documentation)

- [Installation Guide](docs/installation.md)
- [Configuration](docs/configuration.md)
- [Models &amp; Relationships](docs/models.md)
- **[Model Factories](docs/factories.md)** 🆕
- [Organizational Chart &amp; Reporting Lines](docs/organizational-chart.md)
- [Traits &amp; Behaviors](docs/traits.md)
- [Policies &amp; Authorization](docs/policies.md)
- [Console Commands](docs/commands.md)
- [API Reference](docs/api.md)
- [Examples](docs/examples.md)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Azahari Zaman](https://github.com/azaharizaman)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance67

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

194d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd098df033715920fe22c5562344c432ac329ccfdc3ba3f3ff18f583d48ca343?d=identicon)[azaharizaman](/maintainers/azaharizaman)

---

Top Contributors

[![azaharizaman](https://avatars.githubusercontent.com/u/117408?v=4)](https://github.com/azaharizaman "azaharizaman (17 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (6 commits)")

---

Tags

laravelpackageofficestaffhierarchybackofficecompanyorganizationdepartment

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/azaharizaman-laravel-backoffice/health.svg)

```
[![Health](https://phpackages.com/badges/azaharizaman-laravel-backoffice/health.svg)](https://phpackages.com/packages/azaharizaman-laravel-backoffice)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[studio/laravel-totem

A Laravel package to manage your cron jobs through a beautiful dashboard

1.8k1.1M](/packages/studio-laravel-totem)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3593.5k](/packages/baril-bonsai)[andreaselia/analytics

Analytics for the Laravel framework.

19719.5k2](/packages/andreaselia-analytics)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
