Okay...let's create a new controller :
Then add this method :
Last,.. add a new route for above method :
Doneee... We have successfully created a rest-api on laravel... :D
For testing it we use postman or soapUI... First let's use postman....
just enter this link on postman :
There you are... We can see that our response is there... So one thing to one in rest-api, we have to return an array from our method or we can use json response also like this :
This one will gonna give the same response like before.... Okaay... Next....is using soapUI...
Create a new project on soapUI
Aaand..... Tadaaaaa....
Okaaay... That's all for the first part, we are just using 'get' method here... :)
Go to the next part---post method---
Then add this method :
Last,.. add a new route for above method :
Doneee... We have successfully created a rest-api on laravel... :D
For testing it we use postman or soapUI... First let's use postman....
just enter this link on postman :
There you are... We can see that our response is there... So one thing to one in rest-api, we have to return an array from our method or we can use json response also like this :
This one will gonna give the same response like before.... Okaay... Next....is using soapUI...
Create a new project on soapUI
Aaand..... Tadaaaaa....
Okaaay... That's all for the first part, we are just using 'get' method here... :)
Go to the next part---post method---