I am facing an error while working with laravel & Ajax.
Here is my code.
<button id="openBtn" class="btn blue pull-right"><i class="glyphicon glyphicon-plus"></i> Add Certification</button>
$(".editcertifictns #openBtn").click(function(e){
e.preventDefault();
$.ajax({
type:'get',
dataType:'html',
async:false,
url:'getcertifications',
success:function(response){
$("select[name=certictnsoptn]").html(response);
$(".modelPophldr,.modelPop").show();
$("#catagry_name").val("").focus();
$(".formitmpic").hide();
$(".modelPop").animate({'margin-top':'25px'});
},
});
Routes.
Route::get('getcertifications',['uses'=>'GblgetapiController@getcertifications']);
Controller
public function getcertifications(){
$arr = DB::table('master_cirtfctnassc')->get();
$string ="";
foreach ($arr as $arr) {
$string .= "<option value='.$arr->cirtfctnassc_name.'>".$arr->cirtfctnassc_name."</option>"
}
return $string;
}
Binding area..
<div class="modelBody">
<div class="form-group">
<select class="form-control" name="certictnsoptn">
<option></option>
</select>
</div>
</div>
When Clicking on the button, the app will sent an ajax..
I am attaching the screenshot of firebug when ajax perform...
look the URL hovered...:(((((
How can I use the full url in js file without making a issue in migration stage.... Anybody please help me to solve this issue ???? :(:(:(:(:(:(:(