PHPackages                             santigarcor/laravel-ownable - 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. santigarcor/laravel-ownable

ActiveLibrary

santigarcor/laravel-ownable
===========================

Simple trait to manage the ownershipt of models/objects

1.0.3(2y ago)202294[1 PRs](https://github.com/santigarcor/laravel-ownable/pulls)MITPHPCI failing

Since May 14Pushed 2y ago2 watchersCompare

[ Source](https://github.com/santigarcor/laravel-ownable)[ Packagist](https://packagist.org/packages/santigarcor/laravel-ownable)[ RSS](/packages/santigarcor-laravel-ownable/feed)WikiDiscussions master Synced 2d ago

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

Check model ownership for Laravel
=================================

[](#check-model-ownership-for-laravel)

[![tests](https://github.com/santigarcor/laravel-ownable/workflows/tests/badge.svg?branch=master)](https://github.com/santigarcor/laravel-ownable/workflows/tests/badge.svg?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/77fa573a331be4931e972f429276f2a3c28fcdeae6971bb0890044184c48083c/68747470733a2f2f706f7365722e707567782e6f72672f73616e7469676172636f722f6c61726176656c2d6f776e61626c652f76)](//packagist.org/packages/santigarcor/laravel-ownable)[![Total Downloads](https://camo.githubusercontent.com/9ddc82f4a334f4c8ac5ccc47ecf046eabaa674a95f1a0abfbceef631af186b67/68747470733a2f2f706f7365722e707567782e6f72672f73616e7469676172636f722f6c61726176656c2d6f776e61626c652f646f776e6c6f616473)](//packagist.org/packages/santigarcor/laravel-ownable)[![License](https://camo.githubusercontent.com/1af67c7c9581b6349f2192bccebea8421d18c5f850dd746f42002af952c8051b/68747470733a2f2f706f7365722e707567782e6f72672f73616e7469676172636f722f6c61726176656c2d6f776e61626c652f6c6963656e7365)](//packagist.org/packages/santigarcor/laravel-ownable)

This trait allows you to check if a model owns some other model in your Laravel application.

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

[](#installation)

Simply run:

```
composer require santigarcor/laravel-ownable
```

Then you have to use the `OwnsModels` trait in the models you want to check if they own other models.

```
