PHPackages                             dan/laravel-more - 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. [Framework](/categories/framework)
4. /
5. dan/laravel-more

ActiveProject[Framework](/categories/framework)

dan/laravel-more
================

More for your Laravel projects.

v0.3.1(4y ago)018.4k1MITPHPPHP &gt;=7.0CI failing

Since Feb 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/DataAndNumbersOrganization/laravel-more)[ Packagist](https://packagist.org/packages/dan/laravel-more)[ RSS](/packages/dan-laravel-more/feed)WikiDiscussions master Synced yesterday

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

More (for Laravel)
==================

[](#more-for-laravel)

Why more? Because I seem to use it in all my Laravel projects. And who doesn't want more Laravel? ;p

Highlights
----------

[](#highlights)

### compact()

[](#compact)

Example for compact(), with say, a payment...

```
$user->update($payment->compact());

// is the same as

$user->update(['payment_id' => $payment->getKey()]);

// or if your field was `default_payment_id` instead of `payment_id`...

$user->update($payment->compact('default_payment');

```

### unmorph($as = null)

[](#unmorphas--null)

The unmorph($as) function is similar to compact()...

```
$order->update($transaction->unmorph('charge'));

// is the same as

$order->update(['charge_id' => $transaction->getKey(), 'charge_type' => get_class($transaction)]);

```

### BelongsToUser

[](#belongstouser)

How often do your models belong to `User`... a lot, right?

```
class Post extend Model
{
    use BelongsToUser;
}

```

#### Usage

[](#usage)

```
$post->user()                       // BelongsTo
$post->user                         // App\User
$post->isAccessibleBy($user)        // boolean
Post::forUser($user)                // Builder|Post
Post::forUsers($arr_or_col)         // Builder|Post
Post::createForUser($user, [...])   // Post

```

### And of course there is more included

[](#and-of-course-there-is-more-included)

The `\More\Laravel\Traits\Model\Core` namespace is reasonable for global usage.

The `\More\Laravel\Traits\Model` namespace is for the per model use cases.

Good Luck!

Composer
--------

[](#composer)

```
$ composer require dan/laravel-more dev-master

```

### Implementation options

[](#implementation-options)

#### Do you have a base model? e.g. `App\Model`

[](#do-you-have-a-base-model-eg-appmodel)

> Yes

- Add the traits you like to base model.
- Or extend \\More\\Laravel\\Model

> No

- Make a base model `\App\Model` that extends `More\Laravel\Model` or do à la carte, and `use \More\Laravel\Traits\Model\*` as needed.
- Or extend `\More\Laravel\Model` if you're really lazy.
- Or use traits on specific models...[blerg](https://www.urbandictionary.com/define.php?term=blerg).

Contributors
------------

[](#contributors)

- [Diogo Gomes](https://github.com/diogogomeswww)

License
-------

[](#license)

MIT.

###  Health Score

41

↑

FairBetter than 89% of packages

Maintenance60

Regular maintenance activity

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 54.3% 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.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~97 days

Total

35

Last Release

1519d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.6

v0.2.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/219?v=4)[Dan Benjamin](/maintainers/dan)[@dan](https://github.com/dan)

---

Top Contributors

[![danrichards](https://avatars.githubusercontent.com/u/470255?v=4)](https://github.com/danrichards "danrichards (19 commits)")[![diogogomeswww](https://avatars.githubusercontent.com/u/11543163?v=4)](https://github.com/diogogomeswww "diogogomeswww (15 commits)")[![forgiv](https://avatars.githubusercontent.com/u/49741676?v=4)](https://github.com/forgiv "forgiv (1 commits)")

---

Tags

laravel

### Embed Badge

![Health badge](/badges/dan-laravel-more/health.svg)

```
[![Health](https://phpackages.com/badges/dan-laravel-more/health.svg)](https://phpackages.com/packages/dan-laravel-more)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k49.4M479](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)

PHPackages © 2026

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