PHP code example of rawbinn / lp-auth

1. Go to this page and download the library: Download rawbinn/lp-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/ */

    

rawbinn / lp-auth example snippets


namespace App\Models;

use Rawbinn\Auth\Models\User as BaseUser;

class User extends BaseUser
{
    //
}

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\Models\User::class,
    ],
],

// config/lp-auth.php
'features' => [
    'login' => true,
    'register' => true,
    'password_reset' => true,
    'roles_permissions' => true,
    'two_factor' => false,
    'otp' => false,
    'passkey' => false,
    'google' => false,
    'social' => false,
],

access()->hasRole('Administrator');
access()->allow('manage-users');

Route::middleware(['auth', 'lp-auth.permission:manage-users'])->group(function () {
    //
});
bash
composer lp-auth:install
php artisan migrate
bash
php artisan vendor:publish --tag=lp-auth-migrations