I'm using laravel with json pass my data to controller. Everything seems work fine in html template file. But when comes to controller, $_GET method didn't work at all. Undefined index.
Route
Route::post('/live/{stream_active}/{vid_url}', 'Controller@getAjax');
Controller
public function getAjax($stream_active,$vid_url)
{
$stream_active = "1";
$vid_url = $_GET['vid_url']; //Undefine index
$input = Input::all();
$full_path = "http://xx.xxx.xx.xx/vod/".$vid_url;
$input['stream_active'] = $stream_active;
$input['vid_url'] = $full_path;
$this->video->create($input);
}
AJAX
$.ajax({
url : '/live/{stream_active}/{vid_url}',
type : 'POST',
data : { stream_active : '1', vid_url : path_url},
success : function (data)
{
alert('Updated completed.');
}
});