Files
go_nuxt_admin/content/admin_oanel.md
Beyhan Oğur 5285a0dd86 first commit
2026-04-26 22:07:47 +03:00

475 lines
13 KiB
Markdown

css ler /public/css/ kalsorunde
* Bootstrap v5.2.0-beta1 kullanarak yapabilirsin
settings index.vue de tab li bir yapi ile settings ve hero yu yapalim
solda bir sidebar menu ile yapalim
Admin Panel Settings
settings ve hero da resimleri gondermeden once en boy format kalite ayarlarini yapacaz "sharp": "^0.34.5",
bu kutuplahnetyi kulanalim seçmelerde default olarak avif formati olsun
# Login olmak#
is_admin = true olanalar sadece girebilir adminb kismina
curl -X 'POST' \
'http://localhost:8080/api/v1/auth/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "beyhan@beyhan.dev",
"password": "1923btO**"
}'
Request URL
http://localhost:8080/api/v1/auth/login
Server response
Code Details
200
Response body
Download
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgzOTc5LCJpYXQiOjE3NzExNzY3Nzl9.bVzWG3KHsKkqm11A1uNru5H3g5kZtq30lQxgasCqhBk",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJyZWZyZXNoIiwic3ViIjoiMSIsImV4cCI6MTc3Mzc2ODc3OSwiaWF0IjoxNzcxMTc2Nzc5fQ.wRT0ECN-UsF4ileQHUXl0evePXlaCuG8vb11wWt75Es",
"user": {
"email": "beyhan@beyhan.dev",
"first_name": "Beyhan",
"id": 1,
"is_admin": true,
"last_name": "Oğur",
"username": "beyhano"
}
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 765
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:32:58 GMT
vary: Origin
#####################################
#Settings Yeni Ekle#
'''
curl -X 'POST' \
'http://localhost:8080/api/v1/setting' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE' \
-H 'Content-Type: multipart/form-data' \
-F 'title=Title' \
-F 'meta_title=Meta Title' \
-F 'meta_description=Meta Description' \
-F 'phone=Phone' \
-F 'url=URL' \
-F 'email=Email' \
-F 'facebook=Facebook' \
-F 'x=x' \
-F 'instagram=Instagram' \
-F 'whatsapp=Whatsapp' \
-F 'pinterest=Pinterest' \
-F 'linkedin=Linkedin' \
-F 'slogan=Slogan' \
-F 'address=Address' \
-F 'copyright=Copyright' \
-F 'map_embed=Map Embed' \
-F 'is_active=true' \
-F 'w_logo=@845660.png;type=image/png' \
-F 'b_logo=@845660.png;type=image/png'
Request URL
http://localhost:8080/api/v1/setting
Server response
Code Details
201
Response body
Download
{
"ID": 2,
"CreatedAt": "2026-02-15T17:24:34.125454Z",
"UpdatedAt": "2026-02-15T17:24:34.125454Z",
"DeletedAt": null,
"title": "Title",
"meta_title": "Meta Title",
"meta_description": "Meta Description",
"phone": "Phone",
"url": "URL",
"email": "Email",
"facebook": "Facebook",
"x": "x",
"instagram": "Instagram",
"whatsapp": "Whatsapp",
"pinterest": "Pinterest",
"linkedin": "Linkedin",
"slogan": "Slogan",
"address": "Address",
"copyright": "Copyright",
"map_embed": "Map Embed",
"w_logo": "/uploads/settings/w_1771176274_845660.png",
"b_logo": "/uploads/settings/b_1771176274_845660.png",
"is_active": true
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 564
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:24:33 GMT
vary: Origin
'''
#Settings Güncelle#
'''
curl -X 'PUT' \
'http://localhost:8080/api/v1/setting/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE' \
-H 'Content-Type: multipart/form-data' \
-F 'title=Title' \
-F 'meta_title=Meta Title' \
-F 'meta_description=Meta Description' \
-F 'phone=Phone' \
-F 'url=URL' \
-F 'email=Email' \
-F 'facebook=Facebook' \
-F 'x=x' \
-F 'instagram=Instagram' \
-F 'whatsapp=Whatsapp' \
-F 'pinterest=Pinterest' \
-F 'linkedin=Linkedin' \
-F 'slogan=Slogan' \
-F 'address=Address' \
-F 'copyright=Copyright' \
-F 'map_embed=Map Embed' \
-F 'is_active=true' \
-F 'w_logo=@18d11cf76c60f0b453aaea8da0838d3b.png;type=image/png' \
-F 'b_logo=@1657955547black-google-icon.png;type=image/png'
Request URL
http://localhost:8080/api/v1/setting/1
Server response
Code Details
200
Response body
Download
{
"ID": 1,
"CreatedAt": "2026-02-15T19:43:23.226+03:00",
"UpdatedAt": "2026-02-15T17:27:21.266645Z",
"DeletedAt": null,
"title": "Title",
"meta_title": "Meta Title",
"meta_description": "Meta Description",
"phone": "Phone",
"url": "URL",
"email": "Email",
"facebook": "Facebook",
"x": "x",
"instagram": "Instagram",
"whatsapp": "Whatsapp",
"pinterest": "Pinterest",
"linkedin": "Linkedin",
"slogan": "Slogan",
"address": "Address",
"copyright": "Copyright",
"map_embed": "Map Embed",
"w_logo": "/uploads/settings/w_1771176441_18d11cf76c60f0b453aaea8da0838d3b.png",
"b_logo": "/uploads/settings/b_1771176441_1657955547black-google-icon.png",
"is_active": true
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 613
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:27:20 GMT
vary: Origin
'''
#Settings Silme#
'''
curl -X 'DELETE' \
'http://localhost:8080/api/v1/setting/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE'
Request URL
http://localhost:8080/api/v1/setting/1
Server response
Code Details
200
Response body
Download
{
"message": "setting deleted successfully"
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 38
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:26:38 GMT
vary: Origin
'''
#Settings Listeleme#
'''
curl -X 'GET' \
'http://localhost:8080/api/v1/setting' \
-H 'accept: application/json'
Request URL
http://localhost:8080/api/v1/setting
Server response
Code Details
200
Response body
Download
{
"ID": 1,
"CreatedAt": "2026-02-15T19:43:23.226+03:00",
"UpdatedAt": "2026-02-15T20:27:21.266+03:00",
"DeletedAt": null,
"title": "Title",
"meta_title": "Meta Title",
"meta_description": "Meta Description",
"phone": "Phone",
"url": "URL",
"email": "Email",
"facebook": "Facebook",
"x": "x",
"instagram": "Instagram",
"whatsapp": "Whatsapp",
"pinterest": "Pinterest",
"linkedin": "Linkedin",
"slogan": "Slogan",
"address": "Address",
"copyright": "Copyright",
"map_embed": "Map Embed",
"w_logo": "/uploads/settings/w_1771176441_18d11cf76c60f0b453aaea8da0838d3b.png",
"b_logo": "/uploads/settings/b_1771176441_1657955547black-google-icon.png",
"is_active": true
}
Response headers
content-length: 615
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:28:37 GMT
'''
#####################################
admin için Hero ayarlari
#Hero Yeni Ekle#
'''
curl -X 'POST' \
'http://localhost:8080/api/v1/hero' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE' \
-H 'Content-Type: multipart/form-data' \
-F 'title=Title' \
-F 'text1=Text1' \
-F 'text2=Text2' \
-F 'text4=Text4' \
-F 'text5=Text5' \
-F 'color=Color' \
-F 'is_active=true' \
-F 'image=@1200x630bb.png;type=image/png'
Request URL
http://localhost:8080/api/v1/hero
Server response
Code Details
201
Response body
Download
{
"ID": 2,
"CreatedAt": "2026-02-15T17:13:52.46361Z",
"UpdatedAt": "2026-02-15T17:13:52.46361Z",
"DeletedAt": null,
"color": "Color",
"title": "Title",
"text1": "Text1",
"text2": "Text2",
"text4": "Text4",
"text5": "Text5",
"image": "/uploads/heroes/1771175632_1200x630bb.png",
"is_active": true
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 272
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:13:51 GMT
vary: Origin
'''
#Hero Güncelle#
'''
curl -X 'PUT' \
'http://localhost:8080/api/v1/hero/2' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE' \
-H 'Content-Type: multipart/form-data' \
-F 'title=Title' \
-F 'text1=Text1' \
-F 'text2=Text2' \
-F 'text4=Text4' \
-F 'text5=Text5' \
-F 'color=Color' \
-F 'is_active=true' \
-F 'image=@1632286445-en-sqdgame-main-playgrou-5BVA_cover.jpg;type=image/jpeg'
Request URL
http://localhost:8080/api/v1/hero/2
Server response
Code Details
200
Response body
Download
{
"ID": 2,
"CreatedAt": "2026-02-15T20:13:52.463+03:00",
"UpdatedAt": "2026-02-15T17:17:21.182814Z",
"DeletedAt": null,
"color": "Color",
"title": "Title",
"text1": "Text1",
"text2": "Text2",
"text4": "Text4",
"text5": "Text5",
"image": "/uploads/heroes/1771175841_1632286445-en-sqdgame-main-playgrou-5BVA_cover.jpg",
"is_active": true
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 312
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:17:21 GMT
vary: Origin
'''
#Hero Silme#
'''
curl -X 'DELETE' \
'http://localhost:8080/api/v1/hero/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImJleWhhbkBiZXloYW4uZGV2IiwiaXNfYWRtaW4iOnRydWUsImZpcnN0X25hbWUiOiJCZXloYW4iLCJsYXN0X25hbWUiOiJPxJ91ciIsInRva2VuX3R5cGUiOiJhY2Nlc3MiLCJzdWIiOiIxIiwiZXhwIjoxNzcxMTgwODI4LCJpYXQiOjE3NzExNzM2Mjh9.l51p91--l7JcUbBPHwwVjqRgoT7KXFtU-33HLr4YfBE'
Request URL
http://localhost:8080/api/v1/hero/1
Server response
Code Details
200
Response body
Download
{
"message": "hero deleted successfully"
}
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization,Content-Type,Accept,Origin,X-Requested-With
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
access-control-allow-origin: http://localhost:8080
access-control-max-age: 600
content-length: 39
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:18:39 GMT
vary: Origin
'''
#Hero Listeleme#
'''
curl -X 'GET' \
'http://localhost:8080/api/v1/hero' \
-H 'accept: application/json'
Request URL
http://localhost:8080/api/v1/hero
Server response
Code Details
200
Response body
Download
{
"ID": 2,
"CreatedAt": "2026-02-15T20:13:52.463+03:00",
"UpdatedAt": "2026-02-15T20:17:21.182+03:00",
"DeletedAt": null,
"color": "Color",
"title": "Title",
"text1": "Text1",
"text2": "Text2",
"text4": "Text4",
"text5": "Text5",
"image": "/uploads/heroes/1771175841_1632286445-en-sqdgame-main-playgrou-5BVA_cover.jpg",
"is_active": true
}
Response headers
content-length: 314
content-type: application/json; charset=utf-8
date: Sun,15 Feb 2026 17:20:30 GMT
'''
##############################################################################################