Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
55bfeb5e
Unverified
Commit
55bfeb5e
authored
Mar 13, 2018
by
Viral Solani
Committed by
GitHub
Mar 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #182 from viralsolani/analysis-zEdDGy
Apply fixes from StyleCI
parents
eabd3fd9
254e06e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
21 deletions
+19
-21
BlogTagsController.php
app/Http/Controllers/Api/V1/BlogTagsController.php
+8
-10
BlogsController.php
app/Http/Controllers/Api/V1/BlogsController.php
+11
-11
No files found.
app/Http/Controllers/Api/V1/BlogTagsController.php
View file @
55bfeb5e
...
...
@@ -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
;
}
}
app/Http/Controllers/Api/V1/BlogsController.php
View file @
55bfeb5e
...
...
@@ -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.'
,
];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment