===Maybe I've got it wrong. See the correct answer at the end.===
First of all, you need setup your routerProvider: https://www.w3schools.com/angular/angular_routing.asp
After, you can set a route like this:
app.config(function($routeProvider) {
$routeProvider.when("/todos/show/:id", {
//your content here like example of w3schools
})
});
Or
app.config(function($routeProvider) {
$routeProvider.when("/todos/show/:id?", {
//your content here like example of w3schools
})
});
If id is an optional field.
Now, you need pass $routeParams to your controller, and you can get route data:
var myApp = angular.module('myApp',[]);
myApp.controller('Controller', ['$scope', '$routeParams', function($scope, $routeParams) {
console.log($routeParams.id)
}]);
===Correct answer===
Use post!
Angular:
$http.post('/todos/show', {id: $id}).success(function(data) {
$scope.customers = data;
});
Laravel:
Route::post('todos/show', function(Request $request)
{
$users = DB::table('customers')->where('id', $request->input('id'/*, 'optional default value'*/))->get();
return json_encode($users);
});