Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.24 KB

installation.md

File metadata and controls

60 lines (43 loc) · 2.24 KB

Installation

Requirements, the repositories block, and publishing the config.

Requirements

PHP 8.4 or 8.5, Laravel 13.

The repositories block

laranail/* packages resolve through git rather than Packagist, so Composer needs to be told where to find them. Composer ignores a dependency's own repositories, which is why this goes in the application's composer.json and lists the whole transitive closure:

"repositories": [
    { "type": "vcs", "url": "https://github.com/laranail/authkit.git" },
    { "type": "vcs", "url": "https://github.com/laranail/console.git" },
    { "type": "vcs", "url": "https://github.com/laranail/enumerator.git" },
    { "type": "vcs", "url": "https://github.com/laranail/package-tools.git" },
    { "type": "vcs", "url": "https://github.com/laranail/captcha.git" },
    { "type": "vcs", "url": "https://github.com/laranail/db-tools.git" }
]

Require it

composer require laranail/authkit
php artisan vendor:publish --tag=laranail::authkit-config

That writes config/laranail/authkit.php. The nested directory is deliberate: Laravel turns a nested config directory into a nested key, so the file is read as laranail.authkit, which is the key the package merges its defaults into.

Optional migrations

Publish only what the features you enable actually need:

php artisan vendor:publish --tag=laranail::authkit-passkey-migrations
php artisan migrate

Social account migrations are published by laranail/authkit-social-login, not by this package. Install that package and follow its installation guide if your application enables social login.

For a Blade UI

This package is headless by design: no views, no web routes, and no Blade layer. It does ship the REST API — routes and controllers under /api/auth — so an API-only or Filament consumer installs this package alone and has a login endpoint without pulling in scaffolding. For a browser interface interface use laranail/authkit-preset, which consumes these actions and adds the Blade layer.


← Docs index