PHP code example of parvezmia / laravel-passwordless-auth

1. Go to this page and download the library: Download parvezmia/laravel-passwordless-auth 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/ */

    

parvezmia / laravel-passwordless-auth example snippets


return [
    // Time in minutes before a login token expires
    'token_expiration' => 15,

    // Where to redirect users after successful login
    'redirect_on_login' => '/dashboard',

    // Length of the generated security token
    'token_length' => 64,

    // User model to use for authentication
    'user_model' => \App\Models\User::class,

    // Field to use as login identifier (typically email)
    'login_identifier' => 'email',

    // Email template for login links
    'email_view' => 'passwordless-auth::emails.login-link',
];


bash
php artisan vendor:publish --provider="ParvezMia\LaravelPasswordlessAuth\PasswordlessAuthServiceProvider"
bash
php artisan migrate

php artisan queue:table
php artisan migrate

php artisan queue:work
html
<form method="POST" action="{{ route('passwordless.logout') }}">
    @csrf
    <button type="submit">Logout</button>
</form>