i have laravel application. i posted variable $res in my controller to my view and in the view i have no access to the variable i posted. here is my code:
my route:
Route::get('/pickUpQuestion','createQuizController@showResult');
my controller:
public function showResult()
{
$prio = Input::get('quiz_prio');
$cat = Input::get('quiz_cat');
$les = Input::get('quiz_less');
$rdate = Input::get('date_start');
$res = DB::select("select title from quiz where categories_id='$r2' and lesson_id='$r3' and priority_id='$r1' and date_start='$rdate'");
return View::make('pickUpQuestion')->with('result',$res);
}
and my view:
@extends('layouts.master')
@section('content')
<?php
var_dump($res);
?>
@stop
i take the values in my query from another form in a different view with post method to this view