PHPackages                             petersowah/laravel-bulk-policies - 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. petersowah/laravel-bulk-policies

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

petersowah/laravel-bulk-policies
================================

Generate policies for all existing models in one go.

0.0.1(9mo ago)1139[2 PRs](https://github.com/petersowah/laravel-bulk-policies/pulls)MITPHPPHP ^8.3CI passing

Since Jul 26Pushed 1mo agoCompare

[ Source](https://github.com/petersowah/laravel-bulk-policies)[ Packagist](https://packagist.org/packages/petersowah/laravel-bulk-policies)[ Docs](https://github.com/petersowah/laravel-bulk-policies)[ GitHub Sponsors]()[ RSS](/packages/petersowah-laravel-bulk-policies/feed)WikiDiscussions main Synced 1mo ago

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

Generate policies for all existing models in one go.
====================================================

[](#generate-policies-for-all-existing-models-in-one-go)

[![Latest Version on Packagist](https://camo.githubusercontent.com/247f602567915fa33d9c628010d5346115ab3a5fd761224fd209d3e568816c92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065746572736f7761682f6c61726176656c2d62756c6b2d706f6c69636965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/petersowah/laravel-bulk-policies)[![GitHub Tests Action Status](https://camo.githubusercontent.com/83eda48170ecd562f7f35ba554b51c691187d72a44c56e27bc0987e6c303eb92/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7065746572736f7761682f6c61726176656c2d62756c6b2d706f6c69636965732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/petersowah/laravel-bulk-policies/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a43ac555eea170d8aba293614c680d38c66be387383906b451a0f3436a9155f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7065746572736f7761682f6c61726176656c2d62756c6b2d706f6c69636965732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/petersowah/laravel-bulk-policies/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bd838c7aa6c70a814ca371b7de8d681160ae39978c839b81a8e5204730335348/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065746572736f7761682f6c61726176656c2d62756c6b2d706f6c69636965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/petersowah/laravel-bulk-policies)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

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

[](#installation)

You can install the package via composer:

```
composer require petersowah/laravel-bulk-policies
```

Usage
-----

[](#usage)

### Generate Policies for All Models

[](#generate-policies-for-all-models)

To generate policies for all Eloquent models in your application, run:

```
php artisan make:bulk-policies
```

This command will:

- Scan both `app/Models` and `app` for all Eloquent models (following Laravel conventions).
- Generate a policy in `app/Policies` for each model that does not already have one.
- Each generated policy will have the correct `App\Policies` namespace.
- Skip any models that already have a corresponding policy.

**Example output:**

```
Discovered models:
- App\Models\User
- App\Models\Post
---
Created policies:
- UserPolicy
- PostPolicy
Skipped (already exist):
- CommentPolicy

```

> **Note:**This package is convention-driven and does not require or support custom configuration for model or policy paths. It always follows Laravel's default structure for models and policies.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Peter Sowah](https://github.com/petersowah)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance76

Regular maintenance activity

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

290d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33dae31a3741ab0144f7e5a537334beea594b6b1989e26124446b47b6d43397a?d=identicon)[petersowah](/maintainers/petersowah)

---

Top Contributors

[![petersowah](https://avatars.githubusercontent.com/u/6297425?v=4)](https://github.com/petersowah "petersowah (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelPeter Sowahlaravel-bulk-policies

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/petersowah-laravel-bulk-policies/health.svg)

```
[![Health](https://phpackages.com/badges/petersowah-laravel-bulk-policies/health.svg)](https://phpackages.com/packages/petersowah-laravel-bulk-policies)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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