0

I get the output of the values as following in the postman. [{"currentVersion":1.1}]

How can i get output in simple form as: 1.1

$currentVersion = DB::table('app_Version')
    ->select('currentVersion')
    ->get();
echo $currentVersion

How can i get output in simple form as: 1.1

1 Answer 1

1

You would do:

echo $currentVersion[0]->currentVersion;

However, if you know you'll always have one record, you could simplify this a bit with:

$result = DB::table('app_Version')->first(['currentVersion']);
echo $result->currentVersion;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.