damoonpro / laravel-blog
This is blog module for damoon company
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/damoonpro/laravel-blog
Requires
- damoonpro/laravel-tools: dev-main
- pishran/laravel-persian-slug: ^2.2
This package is auto-updated.
Last update: 2025-10-22 00:16:15 UTC
README
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 admin This 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 admin This route has paginate 9 |
[ { id, label, user = { name, is_admin }, confirmed } ] |
| admin/blog/category/{id}/update | PUT | { label, ! confirmed } | Update category setting If the category created by admin label can change to |
{ message, category = { id } } |
| admin/blog/category/{id}/delete | DELETE | { ---- } | Delete category If 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 } } |