public function show($id)
    {
        if(Request::isAjax()){
            $user = null;
            $message = '';

            try{
                $user = Sentry::findUserById($id);
            }catch(Exception $e){
                $message = $e->getMessage();
            }


            Response::headers()->set('Content-Type', 'application/json');
            Response::setBody(json_encode(
                array(
                    'success'   => !is_null($user),
                    'data'      => !is_null($user) ? $user->toArray() : $user,
                    'message'   => $message,
                    'code'      => is_null($user) ? 404 : 200
                )
            ));
        }else{

        }
    }
public function show($id)
    {
        if(Request::isAjax()){
            $user = null;
            $message = '';

            try{
                $user = Sentry::findUserById($id);
            }catch(Exception $e){
                $message = $e->getMessage();
            }


            Response::headers()->set('Content-Type', 'application/json');
            Response::setBody(json_encode(
                array(
                    'success'   => !is_null($user),
                    'data'      => !is_null($user) ? $user->toArray() : $user,
                    'message'   => $message,
                    'code'      => is_null($user) ? 404 : 200
                )
            ));
        }else{

        }
    }
public function show ( $ id ) { if ( Request :: isAjax ( ) ) { $ user = null ; $ message = '' ; try { $ user = Sentry :: findUserById ( $ id ) ; } catch ( Exception $ e ) { $ message = $ e -> getMessage ( ) ; } Response :: headers ( ) -> set ( 'Content-Type' , 'application/json' ) ; Response :: setBody ( json_encode ( array ( 'success' => ! is_null ( $ user ) , 'data' => ! is_null ( $ user ) ? $ user -> toArray ( ) : $ user , 'message' => $ message , 'code' => is_null ( $ user ) ? 404 : 200 ) ) ) ; } else { } }
display resource with specific id
display resource with specific id