Giter Club home page Giter Club logo

gestione_menu_api's People

Contributors

marilari88 avatar

Stargazers

 avatar

Watchers

 avatar

gestione_menu_api's Issues

PUT Method Not Allowed

When I try to update a record from my Angular Frontend I get:

/gestione_menu/public/api/dishes/56:1 PUT 
http://localhost/gestione_menu/public/api/dishes/56 405 (Method Not Allowed)

And Then

Access to XMLHttpRequest at 'http://localhost/gestione_menu/public/api/dishes/56' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Here it is my route list:

+--------+-----------+-----------------------------------+---------------------+---------------------------------------------------+------------+
| Domain | Method    | URI                               | Name                | Action                                            | Middleware |
+--------+-----------+-----------------------------------+---------------------+---------------------------------------------------+------------+
|        | GET|HEAD  | api/dishes                        |                     | App\Http\Controllers\DishController@index         | api        |
|        | POST      | api/dishes                        |                     | App\Http\Controllers\DishController@store         | api        |
|        | GET|HEAD  | api/dishes/{id}                   |                     | App\Http\Controllers\DishController@show          | api        |
|        | PUT       | api/dishes/{id}                   |                     | App\Http\Controllers\DishController@update        | api        |
|        | DELETE    | api/dishes/{id}                   |                     | App\Http\Controllers\DishController@destroy       | api        |
|        | GET|HEAD  | api/menus                         |                     | App\Http\Controllers\MenuController@index         | api        |
|        | GET|HEAD  | api/menus/{id}                    |                     | App\Http\Controllers\MenuController@show          | api        |
|        | GET|HEAD  | api/recurrences                   | recurrences.index   | App\Http\Controllers\RecurrenceController@index   | api        |
|        | POST      | api/recurrences                   | recurrences.store   | App\Http\Controllers\RecurrenceController@store   | api        |
|        | GET|HEAD  | api/recurrences/create            | recurrences.create  | App\Http\Controllers\RecurrenceController@create  | api        |
|        | GET|HEAD  | api/recurrences/{recurrence}      | recurrences.show    | App\Http\Controllers\RecurrenceController@show    | api        |
|        | PUT|PATCH | api/recurrences/{recurrence}      | recurrences.update  | App\Http\Controllers\RecurrenceController@update  | api        |
|        | DELETE    | api/recurrences/{recurrence}      | recurrences.destroy | App\Http\Controllers\RecurrenceController@destroy | api        |
|        | GET|HEAD  | api/recurrences/{recurrence}/edit | recurrences.edit    | App\Http\Controllers\RecurrenceController@edit    | api        |
+--------+-----------+-----------------------------------+---------------------+---------------------------------------------------+------------+

GET, POST and DELETE work fine. But i cannot understand so many problems for PUT operation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.