Hy all, can anyone help me with converting some data that will be returned from the model (based on RAW request) to JSON.
So in my controller, I have something like:
public function get_index() { $data = Something::getDataFromRawQuery(); return View::make('....')->with('data', $data); }
So my question is how to forward JSON data to the view from the controller?
Here is the request:
$apps = DB::query('SELECT a.name, a.desc, a.sig, ar.rate FROM something a INNER JOIN something_else ar ON (a.id=ar.something_id) ORDER BY ar.rate DESC' ); return $apps;
Srle source share