Questions tagged [laravel-api]

252 questions
8
votes
4 answers

blocked by CORS :The 'Access-Control-Allow-Origin' header contains multiple values '*, *', Laravel8

Access to XMLHttpRequest at 'http://localhost:8000/api/objectives' from origin 'http://localhost:4200' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
6
votes
1 answer

How can I create api forgot password and change password in laravel?

How can I create API for forgot password and change password in laravel use passport? **route : ** **Image of postman : ** ** Parameter pass in api: **
Kinnu123
  • 245
  • 1
  • 2
  • 12
5
votes
1 answer

Laravel HTTP client - How to send file

Thank you in advance, I have one controller function like public function storeBlog(Request $request) { // Here i am receiving file like $request->file('image'); } Now I want to send that file to an API endpoint…
Ronak Solanki
  • 341
  • 2
  • 5
  • 14
4
votes
1 answer

Object of type Illuminate\Auth\AuthManager is not callable

As part of API development, I use Laravel 9 and use "php-open-source-saver/jwt-auth" package for authentication without tokens. The API works fine, but I get an error when I add the following line to the controller $this->middleware('auth:api',…
4
votes
1 answer

Laravel routes, api and web use cases

I am trying to wrap my head around the use cases of web routes and api routes. So far, from what i understand 1) Web routes, are used when we want to return views. 2) Api routes, are used when we want to return json ( Api resource/collection…
Orestis uRic
  • 347
  • 1
  • 6
  • 11
3
votes
2 answers

Can't get data from api with axios in Nuxt components