I am building an API with the help of Dingo/api extension for Laravel. As i am working with all different methods, I stumbled accross the update. Now there are a lot of discussion which method is better to use.
post or put
But for updating an existing element like an Item or Customer.. do i use Post or Put to update that specific element. so in code whichone is more effective for update:
$api->post('items/{id}/edit' , 'App\Http\Controllers\Api\ItemController@edit' );
or
$api->put('items/{id}/edit' , 'App\Http\Controllers\Api\ItemController@edit' );