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 -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -