Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
575
Widok
0
16/07/2021 10:04 am
Topic starter
example script, how to handle
1 Answer
0
16/07/2021 10:05 am
Topic starter
- create file App\Listeners\LogSynchronized.php
- content of LogSynchronized.php
<?php namespace App\Listeners; use Adldap\Laravel\Events\Synchronized; use Illuminate\Support\Facades\Log; class LogSynchronized { public function handle(Synchronized $event) { Log::info("Amazing User '{$event->user->getCommonName()}' has been successfully synchronized."); } }
- edit app/Providers/EventServiceProvider.php and modify $listen var
protected $listen = array( Registered::class => array( SendEmailVerificationNotification::class, ), 'Adldap\Laravel\Events\Synchronized' => [ 'App\Listeners\LogSynchronized', ], );
- run
php artisan adldap:import --restore --delete --no-interaction
- check logs (storage/logs/laravel.log)
-
local.INFO: Amazing User 'nobody' has been successfully synchronized.