Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 1124 Viewer | Category : PHP jQuery AngularJS Codeigniter
Share this post:
Sometimes, you face problem you can't get post data using $this->input->post(), when you fire $http.post() using AngularJS or Jquery. I also face this issue, i can't receive post value when i fire $http.post in AngularJS, But i found how to receive post data or json data in Codeigniter controller. in following example through you can solve your problem:
public function store()
$_POST = json_decode(file_get_contents('php://input'), true);
$posts = $this->input->post();
- Mailgun setup with Laravel 5 example
- Laravel 5 Twitter OAuth using Socialite Package
- Laravel 5 query builder where exists example
- How to get Lat and Lon from google map API in Jquery PHP?
- Order by using multiple columns and manually array field in Laravel?
- How to select concat columns with Laravel Query Builder?
- AngularJS - simple image upload with preview example in PHP
- How to get current month records in Laravel 5?