PHPackages                             laravie/dhosa - 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. [Database &amp; ORM](/categories/database)
4. /
5. laravie/dhosa

ActiveLibrary[Database &amp; ORM](/categories/database)

laravie/dhosa
=============

Hot Swapping for Laravel Eloquent

v1.1.0(5y ago)560.3k↓33.3%4[1 PRs](https://github.com/laravie/dhosa/pulls)1MITPHPPHP &gt;=7.3

Since Mar 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/laravie/dhosa)[ Packagist](https://packagist.org/packages/laravie/dhosa)[ Fund](https://paypal.me/crynobone)[ Fund](https://liberapay.com/crynobone)[ RSS](/packages/laravie-dhosa/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (4)Used By (1)

Hot Swapping for Laravel Eloquent
=================================

[](#hot-swapping-for-laravel-eloquent)

[![Build Status](https://camo.githubusercontent.com/4f8d2f6acdc5322e5bac082520ed881d5976b629febffc1e056b6c52a3f9511e/68747470733a2f2f7472617669732d63692e6f72672f6c6172617669652f64686f73612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/laravie/dhosa)[![Latest Stable Version](https://camo.githubusercontent.com/61640f6acb804c985dbb2fad20478a40d8565518c26507f213fa1585c44f35a9/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f64686f73612f762f737461626c65)](https://packagist.org/packages/laravie/dhosa)[![Total Downloads](https://camo.githubusercontent.com/44952bfcf14d6372c6046524ffa4d64c6cf6c79b57e8f47f681f13ed564f38d0/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f64686f73612f646f776e6c6f616473)](https://packagist.org/packages/laravie/dhosa)[![Latest Unstable Version](https://camo.githubusercontent.com/472097b204baa325d03ba3b83fed01fcbee5fd9fa71366d2989d8ed781710633/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f64686f73612f762f756e737461626c65)](https://packagist.org/packages/laravie/dhosa)[![License](https://camo.githubusercontent.com/f2b9ccd20f2fa5a2a0c9843268017e9330f7e9a76e6ec33af03dc0a89f4f1f74/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f64686f73612f6c6963656e7365)](https://packagist.org/packages/laravie/dhosa)

Dhosa allows developers to implement hot-swapping capabilities on Eloquent models. This will helps package developer to create a base model and app developer can extends upon the base model while making sure that all the relationship uses the proper model.

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

[](#installation)

To install through composer, run the following command from terminal:

```
composer require "laravie/dhosa"

```

Usages
------

[](#usages)

### Enable Hot-Swap

[](#enable-hot-swap)

To enable hot-swap to any Eloquent all you need to do is use `Laravie\Dhosa\Concerns\Swappable` and implements the method.

```
