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

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

meeshalk/laravel-ownable-new
============================

Simple trait to check ownership of models/objects

v1.0.4(1y ago)050MITPHPPHP ^7.3|^7.4|^8.2|^8.3|^8.4CI failing

Since Apr 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Meeshalk/laravel-ownable-new)[ Packagist](https://packagist.org/packages/meeshalk/laravel-ownable-new)[ RSS](/packages/meeshalk-laravel-ownable-new/feed)WikiDiscussions master Synced today

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

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

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

[![tests](https://github.com/meeshalk/laravel-ownable-new/workflows/tests/badge.svg?branch=master)](https://github.com/meeshalk/laravel-ownable-new/workflows/tests/badge.svg?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/b17008675d5cbb15d302decdc90066869f5926353250d1cd48f022b81a4e0b03/68747470733a2f2f706f7365722e707567782e6f72672f6d65657368616c6b2f6c61726176656c2d6f776e61626c652d6e65772f76)](//packagist.org/packages/meeshalk/laravel-ownable-new)[![Total Downloads](https://camo.githubusercontent.com/cc979b36bf3458f49fe2017a4a10be12aa69bcb5da55014651c4ed07c1e103ae/68747470733a2f2f706f7365722e707567782e6f72672f6d65657368616c6b2f6c61726176656c2d6f776e61626c652d6e65772f646f776e6c6f616473)](//packagist.org/packages/meeshalk/laravel-ownable-new)[![License](https://camo.githubusercontent.com/fdb252cc7957e4299c4d472bddea88fcf6d99110846eef31746d602fb7333a0e/68747470733a2f2f706f7365722e707567782e6f72672f6d65657368616c6b2f6c61726176656c2d6f776e61626c652d6e65772f6c6963656e7365)](//packagist.org/packages/meeshalk/laravel-ownable-new)

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

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

[](#installation)

Simply run:

```
composer require meeshalk/laravel-ownable-new
```

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

```
