mr-vaco/nova-blog
最新稳定版本:1.0.0
Composer 安装命令:
composer require mr-vaco/nova-blog
包简介
Blog manager for Laravel Nova
README 文档
README
Installation
composer require mr-vaco/nova-blog
php artisan vendor:publish --tag=blog-migrations
If the "NovaGallery" component has not been installed previously: NovaGallery
If the "NovaStatusesManager" component has not been installed previously: NovaStatusesManager
php artisan migrate
php artisan db:seed --class=\\MrVaco\\NovaBlog\\Database\\Seeders\\BlogCategorySeeder
Ready! Go to the admin panel and be satisfied with the result! :)
API
All requests return ONLY active records
Categories
List of categories: /api/blog/categories
{
"data": [],
"links": {},
"meta": {}
}
Get a category by slug: /api/blog/categories/{slug}
{
"data": {}
}
Posts
Get post by slug from a category: /api/blog/categories/{category:slug}/{post:slug}
{
"data": {}
}
Get posts from a category: /api/blog/categories/{category:slug}/posts
{
"data": [],
"links": {},
"meta": {}
}
Get "recommended" posts from a category: /api/blog/categories/{category:slug}/recommended
{
"data": [],
"links": {},
"meta": {}
}
Post sorting
For routes /api/blog/categories/{category slug}/posts and /api/blog/categories/{category slug}/recommended
you can specify the column by which records will be sorted, as well as the sorting direction.
Sort by column:
orderSorting direction:
direction
For example, sorting by column "updated_at" with direction "asc":
/api/blog/categories/{category slug}/posts?order=updated_at&direction=asc
/api/blog/categories/{category slug}/recommended?order=updated_at&direction=asc
By default, sorting is performed by the column "published_at" with the direction "desc"
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-03