PHPackages                             devanoxltd/core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. devanoxltd/core

ActiveLaravel-package[Utility &amp; Helpers](/categories/utility)

devanoxltd/core
===============

Core package for Laravel projects providing module support, helpers, and license verification. This package is developed for use in Devanox Private Limited projects.

v0.2.0(1w ago)00proprietaryPHPPHP ^8.5CI passing

Since Jul 26Pushed 1w agoCompare

[ Source](https://github.com/devanoxltd/core)[ Packagist](https://packagist.org/packages/devanoxltd/core)[ Docs](https://github.com/devanoxltd/core)[ GitHub Sponsors](https://github.com/devanoxltd)[ RSS](/packages/devanoxltd-core/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (19)Versions (3)Used By (0)

Core
====

[](#core)

 [![Packagist](https://camo.githubusercontent.com/6db8487d30dbb96bd813c5d9faaea168106075457e779a53d9f280341ee3815b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646576616e6f786c74642f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devanoxltd/core) [![PHP from Packagist](https://camo.githubusercontent.com/8fdd7d1495983259423f87f30d55cc1d070d960c53b6879a4dccefc66d8aec56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646576616e6f786c74642f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devanoxltd/core) [![Laravel versions](https://camo.githubusercontent.com/da9f43b40748627f26f0fa5729ee02befedcc003a65e416aba371a1ca1bb5216/68747470733a2f2f62616467652e6c61726176656c2e636c6f75642f62616467652f646576616e6f786c74642f636f72653f7374796c653d666c6174)](https://packagist.org/packages/devanoxltd/core) [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/9cc65c5b16853df1c334cd2e4d3b4f5082fa6d7a01033ed3e970aa044fb6c381/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646576616e6f786c74642f636f72652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/devanoxltd/core/actions) [![Total Downloads](https://camo.githubusercontent.com/f11d185b499ed20bfd1aee388e47e2c0923f842811590c471deefa4c0ed294c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576616e6f786c74642f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devanoxltd/core)

Core package for Laravel projects providing module support, helpers, and multi-tenancy capabilities. This package is developed for use in Devanox Private Limited projects.

Requirements
------------

[](#requirements)

- PHP 8.5 or higher
- Laravel 13.x

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

[](#installation)

You can install the package via Composer:

```
composer require devanoxltd/core
```

You may publish all of the package's resources at once:

```
php artisan vendor:publish --tag="core"
```

Or, you may publish each resource individually:

### Publishing the Configuration File

[](#publishing-the-configuration-file)

```
php artisan vendor:publish --tag="core-config"
```

### Publishing and Running the Migrations

[](#publishing-and-running-the-migrations)

```
php artisan vendor:publish --tag="core-migrations"
php artisan migrate
```

### Publishing the Views

[](#publishing-the-views)

```
php artisan vendor:publish --tag="core-views"
```

### Publishing the Translations

[](#publishing-the-translations)

```
php artisan vendor:publish --tag="core-lang"
```

> **Note on translations:** This package ships its translations under the `eng` locale. To use them in a Laravel project whose default locale is `en`, set `APP_FALLBACK_LOCALE=eng` in your application's `.env` file. You can still publish the language files and create an `en` version under `lang/vendor/core/` to override individual strings.

### Publishing the Public Assets

[](#publishing-the-public-assets)

```
php artisan vendor:publish --tag="core-assets"
```

Tenancy Setup
-------------

[](#tenancy-setup)

If you are using the multi-tenancy features of this package, you need to publish the tenancy configuration and migrations, and then run the installation command:

```
php artisan vendor:publish --tag="tenancy-config"
php artisan vendor:publish --tag="tenancy-migrations"
php artisan tenancy:install
php artisan migrate
```

Next, register the tenant routes in your Laravel application's `bootstrap/app.php` file using the `withRouting` method's `then` callback:

```
use Devanox\Core\Http\Middleware\PreventAccessFromCentralDomains;
use Illuminate\Support\Facades\Route;

// ...

->withRouting(
    web: __DIR__.'/../routes/web.php',
    commands: __DIR__.'/../routes/console.php',
    health: '/up',
    then: function () {
        if (file_exists(base_path('routes/tenant.php'))) {
            Route::middleware([
                'web',
                PreventAccessFromCentralDomains::class,
            ])
                ->name('tenant.')
                ->group(base_path('routes/tenant.php'));
        }
    }
)
```

### Extending Tenancy Models

[](#extending-tenancy-models)

If your host application needs to add custom relationships or logic to the `Tenant` or `Domain` models, you can create your own models extending the package's base models.

First, create your custom model extending the base model:

```
namespace App\Models;

use Devanox\Core\Models\Tenant as BaseTenant;

class Tenant extends BaseTenant
{
    // Add custom relationships or logic here
    public function users()
    {
        return $this->hasMany(User::class);
    }
}
```

Then, update the `config/tenancy.php` configuration file to use your new model:

```
    'models' => [
        'tenant' => App\Models\Tenant::class,
        'domain' => Devanox\Core\Models\Domain::class,
    ],
```

Usage
-----

[](#usage)

The `devanoxltd/core` package provides a rich set of tools to manage modules and multi-tenancy in your Laravel application.

### Artisan Commands

[](#artisan-commands)

#### Module Management

[](#module-management)

- `php artisan module:list`: List all installed modules and their status.
- `php artisan module:enable {module?}`: Enable a specific module. Use the `--all` option to enable all modules.
- `php artisan module:disable {module?}`: Disable a specific module. Use the `--all` option to disable all modules.
- `php artisan module:migrate {module?}`: Run migrations for a specific module or all modules.

#### Core Utilities

[](#core-utilities)

- `php artisan app:clean-up`: Clean up system data, caches, or logs.
- `php artisan migrate:check`: Check for any pending database migrations.
- `php artisan devanox:license-check`: Check licenses for the package.

#### Tenancy Management (when enabled)

[](#tenancy-management-when-enabled)

- `php artisan tenancy:install`: Generate tenancy base models and prepare configuration.
- `php artisan tenant:create-database {id}`: Create a database for a specific tenant.
- `php artisan tenant {artisanCommand}`: Run a specific Artisan command for a specific tenant or all tenants.

### Running Code in a Tenant's Context

[](#running-code-in-a-tenants-context)

You can safely execute code under a specific tenant's context using the `tenancy()->run()` method. This will temporarily set the tenant, switch the database connections and other configured services, run your callback, and then completely restore the original configuration and tenant state.

```
use App\Models\Tenant;

$tenant = Tenant::find(1);

tenancy()->run($tenant, function ($tenant) {
    // This code will run within the context of the tenant
    // e.g., using the tenant's database connection
});
```

### Helper Functions

[](#helper-functions)

The package registers several global helper functions for convenience:

- `isAppInstalled(): bool` - Checks if the application has been installed (verifies the existence of the `storage/installed` file).
- `modules(?bool $status = true): Collection` - Retrieve a collection of modules. Pass `true` for enabled, `false` for disabled, and `null` for all modules.
- `tenancy(): \Devanox\Core\Support\Tenancy` - Resolves the main `Tenancy` manager instance.
- `tenant(): ?\Devanox\Core\Contracts\Models\Tenant` - Returns the currently identified `Tenant` model, or `null` if tenancy is disabled or no tenant is resolved.

### Middleware

[](#middleware)

The service provider automatically registers the following middleware to the HTTP kernel:

- `Devanox\Core\Http\Middleware\InstallApp`: Ensures the application is installed before handling requests.

If tenancy is enabled, it also prepends `PreventAccessFromCentralDomains` to protect tenant-specific routes from being accessed via central application domains.

### Blade &amp; Livewire Components

[](#blade--livewire-components)

The package registers its Blade components under the `core::` namespace and its Livewire components natively. You can use them in your views using the `core::` prefix for blade views, or standard Livewire syntax for any bundled Livewire components.

### Facades

[](#facades)

The package provides the `\Devanox\Core\Facades\Core` facade, which is automatically aliased as `Core` via `composer.json` for easy access to core package functionality.

Testing
-------

[](#testing)

Run the package test suites with Composer:

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Thank you for considering contributing to Core! Please review our [contributing guide](.github/CONTRIBUTING.md) to get started.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Mr Chetan](https://github.com/devanoxltd)
- [All Contributors](../../contributors)

License
-------

[](#license)

Core is proprietary software licensed under the [Proprietary License](LICENSE.md).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance98

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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 ~13 days

Total

2

Last Release

8d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79189789?v=4)[Chetan](/maintainers/mrchetan)[@mrchetan](https://github.com/mrchetan)

---

Top Contributors

[![mr-chetan](https://avatars.githubusercontent.com/u/56998650?v=4)](https://github.com/mr-chetan "mr-chetan (44 commits)")

---

Tags

coredevanoxdevanoxltdlaravellaravel-packagepackagelaravelpackagecoredevanoxltddevanox

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/devanoxltd-core/health.svg)

```
[![Health](https://phpackages.com/badges/devanoxltd-core/health.svg)](https://phpackages.com/packages/devanoxltd-core)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9628.9M155](/packages/livewire-flux)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.8k](/packages/tomshaw-electricgrid)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

45212.2k](/packages/venturedrake-laravel-crm)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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