app/Api/V1/Controllers/InternalUserController.php
/**
     * Gets authenticated user's detail for inclusion in JWTAuth token
     *
     * @return \Illuminate\Http\JsonResponse
     * @internal param $id
     *
     */
Gets authenticated user's detail for inclusion in JWTAuth token
@return \Illuminate\Http\JsonResponse
@internal param $id
Gets authenticated user ' s detail for inclusion in JWTAuth token @return \ Illuminate \ Http \ JsonResponse @internal param $id
public function show()
    {
        $user = $this->authUser();
        if (!$user || !($internalUser = InternalUser::query()->where('user_id', $user->id)->first())) {
            return $this->notFound('Internal user authentication invalid');
        }
        $detail = $internalUser->toArray();
        $states = State::with('cities')->get(['id', 'name']);
        $institutions = Institution::with('parastatals')->get();
        $job_titles = InternalUserStatus::all(['id', 'name', 'description']);
        return $this->withJson([
            'detail' => $detail,
            'states' => $states,
            'institutions' => $institutions,
            'job_titles' => $job_titles
        ]);
    }
public function show ( ) { $ user = $ this -> authUser ( ) ; if ( ! $ user || ! ( $ internalUser = InternalUser :: query ( ) -> where ( 'user_id' , $ user -> id ) -> first ( ) ) ) { return $ this -> notFound ( 'Internal user authentication invalid' ) ; } $ detail = $ internalUser -> toArray ( ) ; $ states = State :: with ( 'cities' ) -> get ( [ 'id' , 'name' ] ) ; $ institutions = Institution :: with ( 'parastatals' ) -> get ( ) ; $ job_titles = InternalUserStatus :: all ( [ 'id' , 'name' , 'description' ] ) ; return $ this -> withJson ( [ 'detail' => $ detail , 'states' => $ states , 'institutions' => $ institutions , 'job_titles' => $ job_titles ] ) ; }
Gets authenticated user's detail for inclusion in JWTAuth token
 @return \Illuminate\Http\JsonResponse
 @internal param $id
Gets authenticated user ' s detail for inclusion in JWTAuth token @return \ Illuminate \ Http \ JsonResponse @internal param $id