Skip to content
Nav

Installation

composer require langsys/laravel-api-keys
Packagist version Monthly downloads License PHP 8.2+ Laravel 10 / 11 / 12
  1. Require the package:

    Terminal window
    composer require langsys/laravel-api-keys
  2. Publish migrations (and optionally the config), then migrate:

    Terminal window
    php artisan vendor:publish --tag=api-keys-migrations
    php artisan vendor:publish --tag=api-keys-config # optional
    php artisan migrate

The migrations skip tables your application already has, so publishing them into an app that already models API keys or permissions is a safe no-op. A table that exists with an incompatible shape is not skipped silently — the migration fails with the table name and the missing columns, rather than installing cleanly and failing later at query time.

Next: creating keys.

Feedback