SunnyBoy
1 week ago
204
8
Laravel

How to display the values based on its key?

Posted 1 week ago by SunnyBoy

How to display the values based on its key?

following is what i get in Post request,

$page = $request->all();

dd($page['regions']);

// Output
"{
    "about_us_title":"<h1>Hello World!</h1>",
    "about_us_content":"<p>\n Lorem ipsum dolor sit amet consectetur adipisicing elit. \n</p>"
}"

What I want is as following, but not sure how to parse

{!! $obj->about_us_title !!}

// Expected Result
// Hello World!
. . .

{!! $obj->about_us_content !!}

// Expected Result
// Lorem ipsum dolor sit amet consectetur adipisicing elit. 

Please sign in or create an account to participate in this conversation.