Unverified Commit 55bfeb5e authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #182 from viralsolani/analysis-zEdDGy

Apply fixes from StyleCI
parents eabd3fd9 254e06e8
......@@ -2,7 +2,6 @@
namespace App\Http\Controllers\Api\V1;
use App\Http\Requests\Backend\BlogTags\StoreApiBlogTagsRequest;
use App\Http\Resources\BlogTagsResource;
use App\Models\BlogTags\BlogTag;
use App\Repositories\Backend\BlogTags\BlogTagsRepository;
......@@ -69,10 +68,10 @@ class BlogTagsController extends APIController
}
/**
* Update BlogTag
*
* @param BlogTag $blog_tag
* @param Request $request
* Update BlogTag.
*
* @param BlogTag $blog_tag
* @param Request $request
*
* @return \Illuminate\Http\JsonResponse
*/
......@@ -92,8 +91,8 @@ class BlogTagsController extends APIController
}
/**
* Delete BlogTag
*
* Delete BlogTag.
*
* @param BlogTag $blog_tag
* @param DeleteBlogTagRequest $request
*
......@@ -109,17 +108,16 @@ class BlogTagsController extends APIController
/**
* validate BlogTag.
*
* @param $request
* @param $request
*
* @return \Illuminate\Http\JsonResponse
*/
public function validatingRequest(Request $request, $id = 0)
{
$validation = Validator::make($request->all(), [
'name' => 'required|max:191|unique:blog_tags,name,' . $id,
'name' => 'required|max:191|unique:blog_tags,name,'.$id,
]);
return $validation;
}
}
......@@ -64,15 +64,15 @@ class BlogsController extends APIController
}
$this->repository->create($request->all());
return new BlogsResource(Blog::orderBy('created_at', 'desc')->first());
}
/**
* Update blog
*
* @param Blog $blog
* @param Request $request
* Update blog.
*
* @param Blog $blog
* @param Request $request
*
* @return \Illuminate\Http\JsonResponse
*/
......@@ -92,10 +92,10 @@ class BlogsController extends APIController
}
/**
* Delete Blog
*
* @param Blog $blog
* @param Request $request
* Delete Blog.
*
* @param Blog $blog
* @param Request $request
*
* @return \Illuminate\Http\JsonResponse
*/
......@@ -111,7 +111,7 @@ class BlogsController extends APIController
/**
* validate Blog.
*
* @param $request
* @param $request
*
* @return \Illuminate\Http\JsonResponse
*/
......@@ -129,6 +129,7 @@ class BlogsController extends APIController
return $validation;
}
/**
* validate message for validate blog.
*
......@@ -141,5 +142,4 @@ class BlogsController extends APIController
'name.max' => 'Blog Title may not be greater than 191 characters.',
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment