22
33namespace App \Http \Controllers \Api \V1 ;
44
5+ use App \Models \Blog ;
6+ use Illuminate \Http \Response ;
7+ use App \Http \Resources \BlogsResource ;
8+ use App \Repositories \Backend \BlogsRepository ;
9+ use App \Http \Requests \Backend \Blogs \StoreBlogsRequest ;
510use App \Http \Requests \Backend \Blogs \DeleteBlogsRequest ;
611use App \Http \Requests \Backend \Blogs \ManageBlogsRequest ;
7- use App \Http \Requests \Backend \Blogs \StoreBlogsRequest ;
812use App \Http \Requests \Backend \Blogs \UpdateBlogsRequest ;
9- use App \Http \Resources \BlogsResource ;
10- use App \Models \Blog ;
11- use App \Repositories \Backend \BlogsRepository ;
12- use Illuminate \Http \Response ;
1313
1414/**
1515 * @group Blog Management
1616 *
1717 * Class BlogsController
1818 *
19- * API's for Blog Management
19+ * APIs for Blog Management
2020 *
2121 * @authenticated
2222 */
@@ -45,9 +45,10 @@ public function __construct(BlogsRepository $repository)
4545 * This endpoint provides a paginated list of all blogs. You can customize how many records you want in each
4646 * returned response as well as sort records based on a key in specific order.
4747 *
48- * @queryParam paginate Which page to show. Example :12
49- * @queryParam orderBy Order by ascending or descending. Example :ASC or DESC
50- * @queryParam sortBy Sort by any database column. Example :created_at
48+ * @queryParam page Which page to show. Example: 12
49+ * @queryParam per_page Number of records per page. (use -1 to retrieve all) Example: 20
50+ * @queryParam order_by Order by database column. Example: created_at
51+ * @queryParam order Order direction ascending (asc) or descending (desc). Example: asc
5152 *
5253 * @responseFile status=401 scenario="api_key not provided" responses/unauthenticated.json
5354 * @responseFile responses/blog/blog-list.json
@@ -66,10 +67,10 @@ public function index(ManageBlogsRequest $request)
6667 /**
6768 * Gives a specific Blog.
6869 *
69- * This endpoint provides you a single Blog.
70+ * This endpoint provides you a single Blog
7071 * The Blog is identified based on the ID provided as url parameter.
7172 *
72- * @urlParam id required The ID of the Blog.
73+ * @urlParam id required The ID of the Blog
7374 *
7475 * @responseFile status=401 scenario="api_key not provided" responses/unauthenticated.json
7576 * @responseFile responses/blog/blog-show.json
@@ -108,7 +109,7 @@ public function store(StoreBlogsRequest $request)
108109 * This endpoint allows you to update existing Blog with new data.
109110 * The Blog to be updated is identified based on the ID provided as url parameter.
110111 *
111- * @urlParam id required The ID of the Blog.
112+ * @urlParam id required The ID of the Blog
112113 *
113114 * @responseFile status=401 scenario="api_key not provided" responses/unauthenticated.json
114115 * @responseFile responses/blog/blog-update.json
@@ -126,13 +127,13 @@ public function update(UpdateBlogsRequest $request, Blog $blog)
126127 /**
127128 * Delete Blog.
128129 *
129- * This endpoint allows you to delete a Blog.
130+ * This endpoint allows you to delete a Blog
130131 * The Blog to be deleted is identified based on the ID provided as url parameter.
131132 *
132- * @urlParam id required The ID of the Blog.
133+ * @urlParam id required The ID of the Blog
133134 *
134135 * @responseFile status=401 scenario="api_key not provided" responses/unauthenticated.json
135- * @responseFile responses/blog/blog-destroy.json
136+ * @responseFile status=204 scenario="When the record is deleted" responses/blog/blog-destroy.json
136137 *
137138 * @param DeleteBlogsRequest $request
138139 * @param \App\Models\Blog $blog
0 commit comments