php - Laravel, response json data into controller and make json_decode into view -


i want make this, 1. controller return json data view

$data =  response::json(array('status' => false, 'code' => 205, 'message' => 'deneme', 'data' => null), 200 );      return view::make('site.index.index')->with('data', $data); 

2. view make decode data , use.

{{ $data2 = @json_decode($data)  }}  {{ var_dump($data2) }} 

json data going view don't decoding on array.

how can decode data?

$data = json_encode(array('status' => false, 'code' => 205, 'message' => 'deneme', 'data' => null));  return view::make('site.index.index')->with('data', $data); 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -