0
votes

I hosted my site in 000webhost. I created several api under the routes>api.php

An then I tested the api's I created usisng POSTMAN

RESULTS:

POST api's works fine and returns json response

example: create client api

GET api's works fine and returns json response

example: get all clients api

One api the update client api which is a PUT api gives me this

enter image description here

API.PHP >

Route::post('/createPlate/{id}',['as' => 'createPlate','uses' => 'PlateController@createPlate']);

Route::post('getPlates', ['as' => 'getPlates','uses' => 'PlateController@getPlates']); //Get Plates

Route::post('getStatus', ['as' => 'getStatus','uses' => 'StatusController@getStatus']); //Get Status

Route::post('/getPlateStatus/{id}', ['as' => 'getPlateStatus','uses' => 'StatusController@getPlateStatus']); //Get Specific Plate Status

Route::post('createClient',['as' => 'createClient','uses' => 'ClientController@createClient']); //Create Client

Route::put('/updateClientInfo/{id}',['as' => 'updateClientInfo','uses' => 'ClientController@updateClientInfo']); //update client info

Route::post('getClients', ['as' => 'getClients','uses' => 'ClientController@getClients']); //Get Clients

Route::post('/getClientContact/{id}', ['as' => 'getClientContact','uses' => 'ClientController@getClientContact']); //Get Specific Client Contacts

Route::post('/getClientPlates/{id}', ['as' => 'getClientPlates','uses' => 'ClientController@getClientPlates']); //Get Specific Client Contacts

Route::post('/createContact/{id}',['as' => 'createContact','uses' => 'ContactController@createContact']); //Create Contact

Only one api does not return a response. What might be causing this problem?

1
Post your routes file pleaseuser320487
Route::put('/updateClientInfo/{id}',['as' => 'updateClientInfo','uses' => 'ClientController@updateClientInfo']); //update client infoMary Nicole Aplita
Route::post('createClient',['as' => 'createClient','uses' => 'ClientController@createClient']); //Create ClientMary Nicole Aplita
Route::post('getClients', ['as' => 'getClients','uses' => 'ClientController@getClients']); //Get ClientsMary Nicole Aplita

1 Answers

2
votes

000webhost does not support put or delete methods on free plans. You have to move to the premium plan for that. I'm sure this is your problem.