PHP code example of frolax / filament-phone-auth
1. Go to this page and download the library: Download frolax/filament-phone-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/ */
frolax / filament-phone-auth example snippets
return [
'notification' => \Frolax\FilamentPhoneAuth\Notifications\VerifyPhoneAuthentication::class,
// Add other configuration options as needed
];
use Frolax\FilamentPhoneAuth\Contracts\HasPhoneAuthentication;
class User extends Authenticatable implements HasPhoneAuthentication
{
public function hasPhoneAuthentication(): bool
{
return $this->phone_authentication_enabled;
}
public function togglePhoneAuthentication(bool $enabled): void
{
$this->phone_authentication_enabled = $enabled;
$this->save();
}
}
bash
php artisan vendor:publish --tag="filament-phone-auth-config"