PHP code example of schilinskialexander / moonshine-register

1. Go to this page and download the library: Download schilinskialexander/moonshine-register library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

schilinskialexander / moonshine-register example snippets


// config/moonshine-register.php
return [
    'enabled' => true,
    'route' => 'register',

    'login_link' => [
        'enabled' => true,
    ],

    'password_reset' => [
        'enabled' => true,
        'route' => 'forgot-password',
        'reset_route' => 'reset-password',
        'broker' => 'moonshine',
    ],

    'auto_login' => false,
    'default_role_id' => 1,
    'role_column' => 'moonshine_user_role_id',
];

'page' => App\MoonShine\Pages\Auth\RegisterPage::class,

'login_link' => [
    'page' => App\MoonShine\Pages\Auth\LoginPage::class,
],

'password_reset' => [
    'request_page' => App\MoonShine\Pages\Auth\ForgotPasswordPage::class,
    'reset_page' => App\MoonShine\Pages\Auth\ResetPasswordPage::class,
],
bash
php artisan vendor:publish --tag=moonshine-register-config
bash
php artisan vendor:publish --tag=moonshine-register-lang
bash
php artisan migrate
bash
php artisan migrate
bash
php artisan test
bash
php artisan test tests/Feature/MoonShineRegisterTest.php