public function handle(ActionInterface $event)
    {
        $data = $event->getAction();

        $action = [
            'class_name'  => get_class($event),
            'user_id'     => $data['user']->id,
            'username'    => $data['user']->username,
            'description' => $data['description'],
        ];

        if (isset($data['information'])) {
            $action['information'] = $data['information'];
        }

        Action::create($action);
    }
public function handle(ActionInterface $event)
    {
        $data = $event->getAction();

        $action = [
            'class_name'  => get_class($event),
            'user_id'     => $data['user']->id,
            'username'    => $data['user']->username,
            'description' => $data['description'],
        ];

        if (isset($data['information'])) {
            $action['information'] = $data['information'];
        }

        Action::create($action);
    }
public function handle ( ActionInterface $ event ) { $ data = $ event -> getAction ( ) ; $ action = [ 'class_name' => get_class ( $ event ) , 'user_id' => $ data [ 'user' ] -> id , 'username' => $ data [ 'user' ] -> username , 'description' => $ data [ 'description' ] , ] ; if ( isset ( $ data [ 'information' ] ) ) { $ action [ 'information' ] = $ data [ 'information' ] ; } Action :: create ( $ action ) ; }
Handle the any actions that need storing.

@param \CachetHQ\Cachet\Bus\Events\ActionInterface $event

@return void
Handle the any actions that need storing .