Question: I want to know how to get the time a user logged out of WordPress.
I tried to implement this but it does not capture the time of logout:

```
function user_last_login( $user_login, $user ){
  update_user_meta($user->ID, '_last_login', time());
}
add_action('wp_login', 'user_last_login', 10, 2);

```

Above code gives me the last login date.

Answer: 
You should be able to simply attach them on the `<router-view>`, because it is just a component.

```
<router-view
  :company-id="clicked_company_id" 
  :project-id="clicked_project_id"
  @project-clicked="onClickProjectId">
</router-view>

```
I dont think you should do that. Instead you should pass the function `onClickProjectId` as a prop, and instead of emitting the event, you should call that function.

```
:onClick = "onClickProjectId"

```

This way you would have more control of what that component is doing inside the component itself.

Otherwise you can go ahead with what Yom S has suggested above.