$kpi->getRouteKey(), 'key' => [ 'public' => $kpi->getPublicKey(), 'route' => $kpi->getRouteKey(), ], 'action_id' => $kpi->action_id, 'action_type' => $kpi->action_type, 'date' => $kpi->date, 'score' => $kpi->score, 'user_id' => $kpi->user_id, 'user_type' => $kpi->user_type, 'deleted_at' => $kpi->deleted_at, 'url' => [ 'public' => trans_url('leaderboard/'.$kpi->getPublicKey()), 'user' => guard_url('leaderboard/kpi/'.$kpi->getRouteKey()), ], 'status' => trans('app.'.$kpi->status), 'created_at' => format_date($kpi->created_at), 'updated_at' => format_date($kpi->updated_at), ]; } }