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! :)
All requests return ONLY active records
{
"data": [],
"links": {},
"meta": {}
}
{
"data": {}
}
{
"data": {}
}
{
"data": [],
"links": {},
"meta": {}
}
{
"data": [],
"links": {},
"meta": {}
}
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:
order
Sorting 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"