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
2d25882c
Commit
2d25882c
authored
Jun 23, 2018
by
Vipul Basapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added update validation in BlogCategory
parent
ae29e260
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
BlogCategoriesController.php
...llers/Backend/BlogCategories/BlogCategoriesController.php
+7
-6
UpdateBlogCategoriesRequest.php
...ts/Backend/BlogCategories/UpdateBlogCategoriesRequest.php
+2
-1
EditResponse.php
app/Http/Responses/Backend/BlogCategory/EditResponse.php
+2
-2
No files found.
app/Http/Controllers/Backend/BlogCategories/BlogCategoriesController.php
View file @
2d25882c
...
@@ -3,16 +3,17 @@
...
@@ -3,16 +3,17 @@
namespace
App\Http\Controllers\Backend\BlogCategories
;
namespace
App\Http\Controllers\Backend\BlogCategories
;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Controller
;
use
App\Http\Responses\ViewResponse
;
use
App\Http\Responses\RedirectResponse
;
use
App\Models\BlogCategories\BlogCategory
;
use
App\Http\Responses\Backend\BlogCategory\EditResponse
;
use
App\Repositories\Backend\BlogCategories\BlogCategoriesRepository
;
use
App\Http\Requests\Backend\BlogCategories\EditBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\StoreBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\CreateBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\CreateBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\DeleteBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\DeleteBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\EditBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\ManageBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\ManageBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\StoreBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\UpdateBlogCategoriesRequest
;
use
App\Http\Requests\Backend\BlogCategories\UpdateBlogCategoriesRequest
;
use
App\Http\Responses\RedirectResponse
;
use
App\Http\Responses\ViewResponse
;
use
App\Models\BlogCategories\BlogCategory
;
use
App\Repositories\Backend\BlogCategories\BlogCategoriesRepository
;
/**
/**
* Class BlogCategoriesController.
* Class BlogCategoriesController.
...
...
app/Http/Requests/Backend/BlogCategories/UpdateBlogCategoriesRequest.php
View file @
2d25882c
...
@@ -27,7 +27,7 @@ class UpdateBlogCategoriesRequest extends Request
...
@@ -27,7 +27,7 @@ class UpdateBlogCategoriesRequest extends Request
public
function
rules
()
public
function
rules
()
{
{
return
[
return
[
'name'
=>
'required|max:191
'
,
'name'
=>
'required|max:191
|unique:blog_categories,name,'
.
$this
->
segment
(
3
)
];
];
}
}
...
@@ -39,6 +39,7 @@ class UpdateBlogCategoriesRequest extends Request
...
@@ -39,6 +39,7 @@ class UpdateBlogCategoriesRequest extends Request
public
function
messages
()
public
function
messages
()
{
{
return
[
return
[
'name.unique'
=>
'Blog category name already exists, please enter a different name.'
,
'name.required'
=>
'Blog category name must required'
,
'name.required'
=>
'Blog category name must required'
,
'name.max'
=>
'Blog category may not be greater than 191 characters.'
,
'name.max'
=>
'Blog category may not be greater than 191 characters.'
,
];
];
...
...
app/Http/Responses/Backend/BlogCategory/EditResponse.php
View file @
2d25882c
<?php
<?php
namespace
App\Http\Responses\Backend\
Menu
;
namespace
App\Http\Responses\Backend\
BlogCategory
;
use
Illuminate\Contracts\Support\Responsable
;
use
Illuminate\Contracts\Support\Responsable
;
...
@@ -14,7 +14,7 @@ class EditResponse implements Responsable
...
@@ -14,7 +14,7 @@ class EditResponse implements Responsable
/**
/**
* @param \App\Models\BlogCategories\BlogCategory $blogCategory
* @param \App\Models\BlogCategories\BlogCategory $blogCategory
*/
*/
public
function
__construct
(
$blogCategory
,
$types
,
$modules
)
public
function
__construct
(
$blogCategory
)
{
{
$this
->
blogCategory
=
$blogCategory
;
$this
->
blogCategory
=
$blogCategory
;
}
}
...
...
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