i want to know, how to display values from controller to view page. the values are fetched from database
<p>i fetch some values from database using laravel 5. but i have no idea to display that values to the view page please help me.</p>

<p>this is my controller code for fetch values from database</p>

<pre class="lang-php prettyprint-override"><code>public function getcategory()
{
    $category =DB::select('select CategoryTitle from category');
    echo json_encode($category);
}
</code></pre>

<p>this is my route</p>

<pre class="lang-php prettyprint-override"><code>Route::get('/addworkout/category',array('uses'=&gt;'WorkoutController@getcategory'));
</code></pre>