Download the PHP package schilinskialexander/moonshine-register without Composer
On this page you can find all versions of the php package schilinskialexander/moonshine-register. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download schilinskialexander/moonshine-register
More information about schilinskialexander/moonshine-register
Files in schilinskialexander/moonshine-register
Package moonshine-register
Short Description Registration page for MoonShine v4 authentication.
License MIT
Informations about the package moonshine-register
MoonShine Register
Русский
Registration and password reset pages for MoonShine v4 authentication.
This package adds a public registration flow to the MoonShine admin login area. It can also replace the default MoonShine login page with a version that links to registration and password reset pages.
Features
- Admin registration page inside the MoonShine route group
- Optional password reset flow for MoonShine users
- Optional automatic login after registration
- Configurable route names and page classes
- Configurable default MoonShine role
- English and German translations
- Laravel package auto-discovery
Requirements
- PHP
^8.3 - Laravel components
^12.0or^13.0 - MoonShine
^4.15
Installation
Install the package with Composer:
Laravel discovers the service provider automatically.
Publish the configuration file if you want to customize the package:
Publish translations if you want to edit the language files:
Run your migrations if the MoonShine tables are not created yet:
What It Adds
By default, the package registers these routes under your configured MoonShine prefix.
If your MoonShine prefix is admin, the routes are:
| Method | URL | Route name |
|---|---|---|
GET |
/admin/register |
moonshine.register |
POST |
/admin/register |
moonshine.register.store |
GET |
/admin/forgot-password |
moonshine.password.request |
POST |
/admin/forgot-password |
moonshine.password.email |
GET |
/admin/reset-password/{token} |
moonshine.password.reset |
POST |
/admin/reset-password/{token} |
moonshine.password.update |
The routes are only registered when MoonShine routes are enabled.
Configuration
After publishing the config file, you can edit:
You can also configure the package through environment variables:
Usage
After installation, open your MoonShine login page. With the default MoonShine prefix, this is:
The login page will show links to:
New users are created in the MoonShine user table and receive the configured default role.
Password Reset
The package configures a moonshine password broker and uses the MoonShine user provider.
The included user model extends MoonShine's default user model and implements Laravel's password reset contract. This is required so MoonShine users can receive reset notifications.
Make sure your application has the standard password reset token table:
Custom Pages
You can replace the included pages by changing the config values:
Your custom pages should render forms that submit to the package route names.
Disabling Features
Disable the whole package:
Disable only password reset:
Disable only the extra links on the login page:
Testing
Run the project tests:
Run only the package-related feature tests:
License
The MIT License.