FEATURE: prepare logging for settings (once it will exist)
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
use App\Events\Event;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
|
||||||
|
class ChangeSettings extends Event
|
||||||
|
{
|
||||||
|
use SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new event instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners;
|
||||||
|
|
||||||
|
use App\Events\ChangeSettings;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class LogChangeSettings extends Logger
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param ChangeSettings $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(ChangeSettings $event)
|
||||||
|
{
|
||||||
|
$parameters = [];
|
||||||
|
|
||||||
|
$this->saveLog($parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for action name. Used only internally
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function getName()
|
||||||
|
{
|
||||||
|
return 'changeSettings';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,9 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
'App\Events\DeleteCustomField' => [
|
'App\Events\DeleteCustomField' => [
|
||||||
'App\Listeners\LogDeleteField',
|
'App\Listeners\LogDeleteField',
|
||||||
],
|
],
|
||||||
|
'App\Events\ChangeSettings' => [
|
||||||
|
'App\Listeners\LogChangeSettings',
|
||||||
|
],
|
||||||
// internal Laravel events - should work as auth.login and auth.logout, however it doesn't...
|
// internal Laravel events - should work as auth.login and auth.logout, however it doesn't...
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\LogLogin'
|
'App\Listeners\LogLogin'
|
||||||
|
|||||||
Reference in New Issue
Block a user