laravel-blog maintained by damoonpro
Description
This is blog module for damoon company
Author
Last update
2022/08/21 19:02
(dev-main)
License
Downloads
6
Blog 📑
Description 📚
- This package make easily blog management
- Right now we are working on [ v1 ] package
TODO ✍️
- Set filter for blogs
Routes 🚀
- Every route start with [ v1/blog ]
Guest 🧑⚕️👨⚕️
| URL | METHOD | REQUEST | DESCRIPTION | RESPONSE |
|---|---|---|---|---|
| / | GET | { ---- } | Collect latest confirmed blogs.This route has paginate 9 | [ { title, slug, description, meta_title, meta_description, categories = [ { id, label } ], user = { name, ! is_admin } }, views, likes, files = [ { id, url } ] } ] |
| {slug} | GET | { ---- } | Get single view of blogs | { title, slug, description, body, meta_title, meta_description, categories = [ { id, label } ], ! user = { name, ! is_admin }, views, likes, files = [ { id, url } ] } |
User 🧑💻
| URL | METHOD | REQUEST | DESCRIPTION | RESPONSE |
|---|---|---|---|---|
| me/blog/create | POST | { title, description, body, meta_title, meta_description, ! categories } | create a blog for user | { message, blog = { slug } } |
| me/blog | GET | { ---- } | Collect latest user blog.This route has paginate 9 | [ { title, slug, description, meta_title, meta_description, categories = [ { id, label } ], views, likes, files = [ { id, url } ] } ] |
| me/{slug} | GET | { ---- } | Get single view of blogs if blog belong to authenticated user | { title, slug, description, body, meta_title, meta_description, categories = [ { id, label } ], views, likes, files = [ { id, url } ] } |
| me/blog/{slug}/update | PUT | { title, description, body, meta_title, meta_description, ! categories } | user update the his blog | { message, blog = { slug } } |
| me/blog/{slug}/file/upload | POST | { file } | upload file for blog if blog belong to user | { message, file = { url } } |
| me/blog/{slug}/file/{id}/delete | DELETE | { file } | delete file of blog if blog belong to user | { message, file = { id } } or { message, blog = { slug } } |
| {slug}/like | POST | { ---- } | like and unlike blog by authenticated user | { message, blog = { slug } } |
Admin 😎
| URL | METHOD | REQUEST | DESCRIPTION | RESPONSE |
|---|---|---|---|---|
| admin/blog | GET | { ---- } | Collect latest blogs for adminThis route has paginate 9 | [ { title, slug, description, meta_title, meta_description, categories = [ { id, label } ], user = { name, ! is_admin }, views, likes, files = [ { id, url } ] } ] |
| admin/blog/category | GET | { ---- } | Collect categories for adminThis route has paginate 9 | [ { id, label, user = { name, is_admin }, confirmed } ] |
| admin/blog/category/{id}/update | PUT | { label, ! confirmed } | Update category settingIf the category created by admin label can change to | { message, category = { id } } |
| admin/blog/category/{id}/delete | DELETE | { ---- } | Delete categoryIf the category created by other admin you can't deleted | { message, category = { id } } |
| admin/blog/category/{id}/confirmed | POST | { ---- } | Change category state to enable or disable | { message, category = { id } } |