PHP code example of smony / filament-user-sessions
1. Go to this page and download the library: Download smony/filament-user-sessions 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/ */
smony / filament-user-sessions example snippets
use Smony\FilamentUserSessions\FilamentUserSessionsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(FilamentUserSessionsPlugin::make());
}
use Illuminate\Contracts\Auth\Authenticatable;
use Smony\FilamentUserSessions\Contracts\ResolvesNewDeviceRecipients;
class SecurityTeamRecipients implements ResolvesNewDeviceRecipients
{
public function resolve(Authenticatable $user): iterable
{
return User::where('is_superadmin', true)->get();
}
}