If you are new to laravel then i think i can suggest this link : https://itsolutionstuff.com/post/how-to-create-rest-api-in-laravel-5-example.html for create api, i think this is better because in that link i see it's create basic coman function for success and error response. You can do it simply RESTFul API with laravel 5.5 app. Thanks :)