PHP code example of atereshchuk / filament-user-activity
1. Go to this page and download the library: Download atereshchuk/filament-user-activity 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/ */
atereshchuk / filament-user-activity example snippets
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
...
\Edwink\FilamentUserActivity\Http\Middleware\RecordUserActivity::class,
];
use Edwink\FilamentUserActivity\Traits\UserActivityTrait;
...
class User extends Authenticatable
{
use UserActivityTrait;
...
}
use Edwink\FilamentUserActivity\FilamentUserActivityPlugin;
...
public function panel(Panel $panel): Panel
{
return $panel
...
->plugins([
FilamentUserActivityPlugin::make()
])
...
}
...