Create
You can add unlimited web information by web settings create route, web settings route allow only POST Method
Note: All field are support only for string, for image use base64
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
body:
{
"field_name": ["logo", "contact number", "contact mail"],
"group": ["web info", "web info", "web info"],
"value": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...", "01xxxxxxxxx", "admin@admin.com"] // all field are support only for string, for image use base64
}
### Result
{
"smg": "Success",
"data": [
{
"field_name": "logo",
"group": "web_info",
"value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...",
"created_by": "---",
"updated_by": "---",
"created_at": "2023-10-01T14:07:48.886162Z",
"updated_at": "2023-10-01T14:07:48.886196Z"
},
{
"field_name": "contact_number",
"group": "web_info",
"value": "01xxxxxxxxx",
"created_by": "---",
"updated_by": "---",
"created_at": "2023-10-01T14:07:48.886359Z",
"updated_at": "2023-10-01T14:07:48.886372Z"
},
{
"field_name": "contact_mail",
"group": "web_info",
"value": "admin@admincom",
"created_by": "---",
"updated_by": "---",
"created_at": "2023-10-01T14:07:48.886507Z",
"updated_at": "2023-10-01T14:07:48.886518Z"
}
]
}
List
Get all web settings list by GET Method with filter function customized option for you. below list of route with parameter
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
#// this option goes for your custom filter, Use only you need any field
body: {
// And Condtion
field_name
value
group
// Or Condtion
field_name
value
group
}
// query exaple
body: {
"field_name": "contact_number",
"or_field_name": "contact_number"
}
### Result
{
"current_page": 1,
"data": [
{
"id": 3,
"field_name": "contact_number",
"group": "web_info",
"value": "admin_at_admincom",
"created_by": 1,
"updated_by": 1,
"created_at": "2023-10-01T14:07:48.000000Z",
"updated_at": "2023-10-01T14:07:48.000000Z"
},
{
...
}
],
"first_page_url": "",
"from": 1,
"last_page": 1,
"last_page_url": "",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "",
"per_page": 15,
"prev_page_url": null,
"to": 2,
"total": 2
}
If you want to get by pagination to the list by GET Method Here we have this featuer for you in this route with parameter like: limit_per_page
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings?limit_per_page=1
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
### Result
{
{
"current_page": 1,
"data": [
{
"id": 3,
"field_name": "contact_number",
"group": "web_info",
"value": "admin_at_admincom",
"created_by": 1,
"updated_by": 1,
"created_at": "2023-10-01T14:07:48.000000Z",
"updated_at": "2023-10-01T14:07:48.000000Z"
},
{
...
}
],
"first_page_url": "",
"from": 1,
"last_page": 1,
"last_page_url": "",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "",
"per_page": 15,
"prev_page_url": null,
"to": 2,
"total": 2
}
=== Query Parameters ===
limit_per_page = 1 // Default 15
page = 1 // number of page for pagination
data = all
Here is example url:
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings?limit_per_page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings?name=apple
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings?page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings?data=all&limit_per_page=1&name=admin&page=1
==============================================================================================================
Single Show
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings/{{id}}
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
### Result
{
"data": {
"id": 1,
"field_name": "logo",
"group": "web_info",
"value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...",
"created_by": 6,
"updated_by": 6,
"created_at": "2023-09-09T16:23:52.000000Z",
"updated_at": "2023-09-09T16:23:52.000000Z"
}
}
Edit
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/category/web_settings/{id}
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
### Result
{
"data": {
"id": 1,
"field_name": "logo",
"group": "web_info",
"value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...",
"created_by": 6,
"updated_by": 6,
"created_at": "2023-09-09T16:23:52.000000Z",
"updated_at": "2023-09-09T16:23:52.000000Z"
}
}
Update
Method allow for update PUT/PATCH/POST
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand/{{id}}
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
body:
{
"field_name": "logo",
"group": "web_info",
"value": "data:image/png;base64,iVBORw0KWJWEBDEHMNBETAANSUhEUgA..."
}
### Result
{
"smg": "Success",
"data": {
"id": 1,
"field_name": "logo",
"group": "web_info",
"value": "data:image/png;base64,iVBORw0KWJWEBDEHMNBETAANSUhEUgA...",
"created_by": {
"id": 6,
"name": "Super Admin"
},
"updated_by": {
"id": 6,
"name": "Super Admin"
},
"created_at": "2023-09-09T16:23:52.000000Z",
"updated_at": "2023-09-10T03:26:40.000000Z"
}
}
DELETE
Method allow for delete DELETE
https://ecom.coderorbit.com/public/api/admin/{{app_token}}/web_settings/{{id}}
headers:{
"Accept": "application/json"
"Authorization" : `Bearer ${token}`
}
### OUTPUT
Success