angular.module('callaheadsService',[]).factory('Callaheads',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'callaheadspaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'callaheads/getall',headers:headers,withCredentials: true});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'callaheads/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'callaheads/'+id);
		},
		save:function(callaheadsData){
			return $http({method:'POST',
							url:url_server+'callaheads',
							data:callaheadsData});
		},
		update:function(id, callaheadsData){
			return $http.put(url_server+'callaheads/'+id,callaheadsData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'callaheads/'+id);
		}
	};
});
