PHPackages                             incadev-uns/core-domain - 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. incadev-uns/core-domain

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

incadev-uns/core-domain
=======================

Core package implementing Incadev's business domain

03888[2 PRs](https://github.com/incadev-uns/core-domain/pulls)PHPCI passing

Since Jan 12Pushed 1mo agoCompare

[ Source](https://github.com/incadev-uns/core-domain)[ Packagist](https://packagist.org/packages/incadev-uns/core-domain)[ RSS](/packages/incadev-uns-core-domain/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Core package implementing Incadev's business domain
===================================================

[](#core-package-implementing-incadevs-business-domain)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9064b45fb82b5c513ced2253a01492359ae4fa5a23c89e5d977466938d55fa32/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e63616465762d756e732f636f72652d646f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/incadev-uns/core-domain)[![GitHub Tests Action Status](https://camo.githubusercontent.com/98003ea687be56734b45068626ff217db1d736003b390e6bd733d3de60fd72f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e63616465762d756e732f636f72652d646f6d61696e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/incadev-uns/core-domain/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/768a71b4b3413d67ab74d73025121948079b244e34c441f50c89e71a372445ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e63616465762d756e732f636f72652d646f6d61696e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/incadev-uns/core-domain/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/af491c655f359cf687b71a3d74a7782bd48fd49086e13ead676ec7ec12f58cb1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e63616465762d756e732f636f72652d646f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/incadev-uns/core-domain)

This package provides the single source of truth for the Incadev business domain, modeling the shared database schema, and Eloquent models. It ensures all projects built on this platform share the same data structure.

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

[](#requirements)

- PHP ^8.2
- Laravel ^12.0

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

[](#installation)

Installing this package is a multi-step process. Please follow these instructions carefully.

### 1. Install the Package

[](#1-install-the-package)

First, install the incadev-uns/core-domain package via Composer:

```
composer require incadev-uns/core-domain:dev-main
```

### 2. Install Dependencies

[](#2-install-dependencies)

This package relies on [Laravel Sanctum](https://laravel.com/docs/12.x/sanctum) and [Spatie's Laravel-Permission](https://spatie.be/docs/laravel-permission/v6/installation-laravel). You must install and configure them first.

Publish Sanctum's configuration and migration

```
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
```

Publish Spatie/Permission's configuration and migration

```
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
```

### 3. Run Core Migrations

[](#3-run-core-migrations)

This package will add all core domain tables and modify your existing users table.

You must run the migrations:

```
php artisan migrate
```

### 4. Configure Your User Model

[](#4-configure-your-user-model)

This is the most critical step. Your `app/Models/User.php` model must be updated to use the traits and fields provided by this package and its dependencies.

#### A. Add Traits

[](#a-add-traits)

Import and use the `HasIncadevCore`, `HasApiTokens`, and `HasRoles` traits.

```
