Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <button ng-click="addSoft()">Add project</button>
- $scope.addSoft = function () {
- var fd = new FormData();
- fd.append('data', 'angular+laravel');
- $http.post('path', fd, {
- transformRequest: angular.identity,
- headers: {
- 'Content-Type': undefined
- }
- }).success(function (response) {
- console.log(response); // angular+laravel
- });
- public function addSoft(Request $request)
- {
- $data = $request->get('data');
- return $data;
- }
Advertisement
Add Comment
Please, Sign In to add comment