PHPackages                             slam-micro/sharedmodels - 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. slam-micro/sharedmodels

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

slam-micro/sharedmodels
=======================

112PHP

Since Apr 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/TonySlam/laravel-shared-models)[ Packagist](https://packagist.org/packages/slam-micro/sharedmodels)[ RSS](/packages/slam-micro-sharedmodels/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

About slam-micro/sharedmodels
-----------------------------

[](#about-slam-microsharedmodels)

This is a simple light-weight package for to get other Eloquent models in other laravel package by simply connecting to the extended database. This package is created to retrieve data from other micro-service instance.

Get Started With slam-micro/sharedmodels
----------------------------------------

[](#get-started-with-slam-microsharedmodels)

\##Installation

Recommended php version 8.2.1

Git Repository [slam-micro/sharedmodels](https://github.com/TonySlam/laravel-shared-models)

Access the package [Packagist slam-micro/sharedmodels](https://packagist.org/packages/slam-micro/sharedmodels)

```
$ composer require slam-micro/sharedmodels
```

\##Usage

```
$host = 'my-custom-host';
$port = 'my-custom-port';
$database = 'my-custom-database';
$username = 'my-custom-username';
$password = 'my-custom-password';

// replace with the name of the table you want to access
$table = 'table-name';

// replace with the fully qualified name of your model class
$modelClass = 'App\\Models\\ModelName';

$databaseConnection = new DatabaseConnection($host, $port, $database, $username, $password);
$models = $databaseConnection->getModels($table, $modelClass);

return $models;

```

Other useful of usage

```
// Get all records
$models->all();

// Get by ID
$models->find(1);

//delete record by ID
$var = $models->where('id', 1)->first();
return $list->delete();

//Update record by ID
$var->update(
    [
      'name' => "John Doe"
     ]
);

```

Author
------

[](#author)

Email:

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/243b58c991aad9fa927ac280efb3ae8c9550ed18c927332548ca651443a89bc0?d=identicon)[Slamtony](/maintainers/Slamtony)

---

Top Contributors

[![slamtony15](https://avatars.githubusercontent.com/u/124620170?v=4)](https://github.com/slamtony15 "slamtony15 (36 commits)")

### Embed Badge

![Health badge](/badges/slam-micro-sharedmodels/health.svg)

```
[![Health](https://phpackages.com/badges/slam-micro-sharedmodels/health.svg)](https://phpackages.com/packages/slam-micro-sharedmodels)
```

###  Alternatives

[sheadawson/silverstripe-blocks

An alternative to the SilverStripe Widgets module.

5955.6k5](/packages/sheadawson-silverstripe-blocks)[pfaciana/tiny-html-minifier

Minify HTML in PHP with just a single class

12104.0k4](/packages/pfaciana-tiny-html-minifier)[dktapps/pmforms

Form API library for PocketMine-MP plugins

532.6k1](/packages/dktapps-pmforms)

PHPackages © 2026

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