PHPackages                             peter9x/laravel-bc - 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. [API Development](/categories/api)
4. /
5. peter9x/laravel-bc

ActiveLibrary[API Development](/categories/api)

peter9x/laravel-bc
==================

Laravel package for Microsoft Business Central API

v0.1.3(7mo ago)2117MITPHPCI passing

Since Aug 13Pushed 6mo agoCompare

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

READMEChangelog (2)Dependencies (7)Versions (7)Used By (0)

 [![Build Status](https://github.com/peter9x/laravel-bc/actions/workflows/php.yml/badge.svg)](https://github.com/peter9x/laravel-bc/actions) [![Latest Stable Version](https://camo.githubusercontent.com/405c7d4cc7896691f465fc357f713941aa10c6654310005181382787aa740c34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706574657239782f6c61726176656c2d6263)](https://packagist.org/packages/peter9x/laravel-bc) [![License](https://camo.githubusercontent.com/1af16d27072b0368fb448c7bab78380cf1bf2256873fd25497105220cad51bd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706574657239782f6c61726176656c2d6263)](https://packagist.org/packages/peter9x/laravel-bc)

Laravel Business Central
========================

[](#laravel-business-central)

A Laravel package for integrating with the **Microsoft Business Central API**.

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

[](#installation)

1. Install the package via Composer:

```
composer require peter9x/laravel-bc
```

2. Publish the configuration file:

```
php artisan vendor:publish --provider="Mupy\\BusinessCentral\\BusinessCentralServiceProvider" --tag=config
```

3. Add the following to your `.env` file:

> **Note:** `BC_COMPANY_ID` is **optional**.
> If not set, you will need to select a company in your code after retrieving the list of companies (see the usage example).

```
BC_CLIENT_ID=your-client-id
BC_CLIENT_SECRET=your-client-secret
BC_TENANT_ID=your-tenant-id
# Optional: if not set, select the company in your script
BC_COMPANY_ID=your-company-id
BC_ENVIRONMENT=sandbox
```

Usage
-----

[](#usage)

```
use Mupy\BusinessCentral\Facades\BusinessCentral;
use Mupy\BusinessCentral\EndPoint\Company;
use Mupy\BusinessCentral\EndPoint\SalesInvoices;

$api = BusinessCentral::getClient();

// Change the environment dynamically if needed
$api->selectEnv('sandbox');

try {
    $result = $api->get(Company::class);

    if ($result->success()) {
        foreach ($result->data() as $entry) {
            // Select the company dynamically if BC_COMPANY_ID is not set in .env
            $company = $api->useCompany($entry['id']);
            $company->get(SalesInvoices::class);
        }
    }
} catch (\Throwable $th) {
    // Handle exceptions as needed
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance66

Regular maintenance activity

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~7 days

Total

6

Last Release

235d ago

### Community

Maintainers

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

---

Top Contributors

[![peter9x](https://avatars.githubusercontent.com/u/63051215?v=4)](https://github.com/peter9x "peter9x (26 commits)")

---

Tags

businesscentrallaravelmicrosoftlaravelmicrosoftbcbusiness centralMicrosoft Business Central

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/peter9x-laravel-bc/health.svg)

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

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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