--- title: API Reference language_tabs: - bash - javascript includes: search: true toc_footers: - Documentation Powered by Documentarian --- # Info Welcome to the generated API reference. [Get Postman Collection](http://localhost/docs/collection.json) #general ## Display a listing of the resource. > Example request: ```bash curl -X GET -G "http://localhost/api/user" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user", "method": "GET", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` > Example response: ```json { "index_resource": true } ``` ### HTTP Request `GET api/user` ## Show the form for creating a new resource. > Example request: ```bash curl -X GET -G "http://localhost/api/user/create" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user/create", "method": "GET", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` > Example response: ```json { "create_resource": true } ``` ### HTTP Request `GET api/user/create` ## Store a newly created resource in storage. > Example request: ```bash curl -X POST "http://localhost/api/user" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user", "method": "POST", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` ### HTTP Request `POST api/user` ## Display the specified resource. > Example request: ```bash curl -X GET -G "http://localhost/api/user/{user}" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user/{user}", "method": "GET", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` > Example response: ```json { "show_resource": "1" } ``` ### HTTP Request `GET api/user/{user}` ## Show the form for editing the specified resource. > Example request: ```bash curl -X GET -G "http://localhost/api/user/{user}/edit" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user/{user}/edit", "method": "GET", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` > Example response: ```json { "edit_resource": "1" } ``` ### HTTP Request `GET api/user/{user}/edit` ## Update the specified resource in storage. > Example request: ```bash curl -X PUT "http://localhost/api/user/{user}" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user/{user}", "method": "PUT", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` ### HTTP Request `PUT api/user/{user}` `PATCH api/user/{user}` ## Remove the specified resource from storage. > Example request: ```bash curl -X DELETE "http://localhost/api/user/{user}" \ -H "Accept: application/json" ``` ```javascript var settings = { "async": true, "crossDomain": true, "url": "http://localhost/api/user/{user}", "method": "DELETE", "headers": { "accept": "application/json" } } $.ajax(settings).done(function (response) { console.log(response); }); ``` ### HTTP Request `DELETE api/user/{user}`