Debabrat Sharma Debabrat Sharma - 1 year ago 139
AngularJS Question

posting data from angular ui to laravel backend

I am trying to post data from angular side that is kept as a separate package and not included inside laravel framework but I am unable to get the data in laravel backend.If I use get method in the laravel route then it works and I get the response in angular side from laravel but when I use post method I don't,it displays error.Can anyone help me ?

Error in Console

response error

Answer Source

Go to app/Http/Middlewar/VerifyCsrfToken

protected $except = [

define all your routes which you want to be csrf token bypass inside except array as I described or define a prefix in your routes as api and add the line 'api/*'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download