---
title: "Installation — Permissions for Laravel | Roundly"
description: "Install via Composer, publish the config first, then publish and run the publish-only migrations."
url: https://roundly-consulting.com/open-source/docs/permissions-for-laravel/installation
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Permissions for Laravel](https://roundly-consulting.com/open-source/docs/permissions-for-laravel.md)

# Installation

Require the package. The service provider and the Permissions facade alias are auto-discovered — no manual registration:

```bash
composer require roundly-consulting/permissions-for-laravel
```

Publish the config before anything else. The holder key type is baked into the schema, so decide between bigint, UUID and ULID keys now (see Database schema & key types):

```bash
php artisan vendor:publish --tag="permissions-config"
```

Then publish and run the migrations:

```bash
php artisan vendor:publish --tag="permissions-migrations"
php artisan migrate
```

## Publish-only migrations

The package never loads its migrations, so php artisan migrate creates nothing until you have published them into your app’s database/migrations. The five migrations land timestamped and in dependency order — permissions, roles, permission\_role, model\_roles, model\_permissions — and publishing again overwrites them in place rather than adding a second copy.

The only publish tags the package exposes are permissions-config and permissions-migrations.

## Next steps

- Add the HasRoles trait to your user model.
- Create your roles and permissions — ideally in an idempotent seeder.
- Protect routes with the native can: middleware.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/permissions-for-laravel.md)
