1. Go to this page and download the library: Download jeffersongoncalves/mfakitv5 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/ */
jeffersongoncalves / mfakitv5 example snippets
// In app/Providers/Filament/AdminPanelProvider.php and AppPanelProvider.php
->multiFactorAuthentication([
AppAuthentication::make()
->brandName('MFA Kit Demo')
->recoverable(), // allows recovery codes
EmailAuthentication::make(),
WhatsAppAuthentication::make(), //
use WallaceMartinss\FilamentEvolution\Actions\SendWhatsappMessageAction;
// In a resource table
public function table(Table $table): Table
{
return $table
->actions([
SendWhatsappMessageAction::make(),
]);
}
// In a page header
protected function getHeaderActions(): array
{
return [
SendWhatsappMessageAction::make()
// Optional sensible defaults
->number('5511999999999')
->message('Hello from MFAKit!'),
];
}
SendWhatsappMessageAction::make()
->numberFrom('phone') // attribute on the record
->instanceFrom('whatsapp_instance_id');
use WallaceMartinss\FilamentEvolution\Enums\MessageTypeEnum;
SendWhatsappMessageAction::make()
->allowedTypes([MessageTypeEnum::TEXT, MessageTypeEnum::IMAGE])
->hideInstanceSelect()
->hideNumberInput()
->textOnly();
// routes/console.php
use Illuminate\Support\Facades\Schedule;
Schedule::command('evolution:cleanup')->daily();