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
0400bf07
Unverified
Commit
0400bf07
authored
Jun 23, 2018
by
Viral Solani
Committed by
GitHub
Jun 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #239 from viralsolani/analysis-XWAQBe
Apply fixes from StyleCI
parents
58f57b3b
b3881d33
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
17 deletions
+17
-17
BlogCategoriesController.php
...llers/Backend/BlogCategories/BlogCategoriesController.php
+7
-7
UpdateBlogCategoriesRequest.php
...ts/Backend/BlogCategories/UpdateBlogCategoriesRequest.php
+1
-1
UpdateBlogTagsRequest.php
app/Http/Requests/Backend/BlogTags/UpdateBlogTagsRequest.php
+1
-1
UpdateBlogsRequest.php
app/Http/Requests/Backend/Blogs/UpdateBlogsRequest.php
+1
-1
ManageBlogCategoriesTest.php
tests/Feature/Backend/ManageBlogCategoriesTest.php
+2
-2
ManageBlogTagsTest.php
tests/Feature/Backend/ManageBlogTagsTest.php
+3
-3
ManageBlogsTest.php
tests/Feature/Backend/ManageBlogsTest.php
+2
-2
No files found.
app/Http/Controllers/Backend/BlogCategories/BlogCategoriesController.php
View file @
0400bf07
...
@@ -3,17 +3,17 @@
...
@@ -3,17 +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\Backend\BlogCategory\EditResponse
;
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 @
0400bf07
...
@@ -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|unique:blog_categories,name,'
.
$this
->
segment
(
3
)
'name'
=>
'required|max:191|unique:blog_categories,name,'
.
$this
->
segment
(
3
),
];
];
}
}
...
...
app/Http/Requests/Backend/BlogTags/UpdateBlogTagsRequest.php
View file @
0400bf07
...
@@ -27,7 +27,7 @@ class UpdateBlogTagsRequest extends Request
...
@@ -27,7 +27,7 @@ class UpdateBlogTagsRequest extends Request
public
function
rules
()
public
function
rules
()
{
{
return
[
return
[
'name'
=>
'required|max:191|unique:blog_tags,name,'
.
$this
->
segment
(
3
)
'name'
=>
'required|max:191|unique:blog_tags,name,'
.
$this
->
segment
(
3
),
];
];
}
}
...
...
app/Http/Requests/Backend/Blogs/UpdateBlogsRequest.php
View file @
0400bf07
...
@@ -27,7 +27,7 @@ class UpdateBlogsRequest extends Request
...
@@ -27,7 +27,7 @@ class UpdateBlogsRequest extends Request
public
function
rules
()
public
function
rules
()
{
{
return
[
return
[
'name'
=>
'required|max:191|unique:blogs,name,'
.
$this
->
segment
(
3
),
'name'
=>
'required|max:191|unique:blogs,name,'
.
$this
->
segment
(
3
),
'content'
=>
'required'
,
'content'
=>
'required'
,
'categories'
=>
'required'
,
'categories'
=>
'required'
,
'tags'
=>
'required'
,
'tags'
=>
'required'
,
...
...
tests/Feature/Backend/ManageBlogCategoriesTest.php
View file @
0400bf07
...
@@ -85,8 +85,8 @@ class ManageBlogCategoriesTest extends TestCase
...
@@ -85,8 +85,8 @@ class ManageBlogCategoriesTest extends TestCase
$catCategory
=
create
(
BlogCategory
::
class
,
[
'name'
=>
'Cat'
]);
$catCategory
=
create
(
BlogCategory
::
class
,
[
'name'
=>
'Cat'
]);
$dogCategory
=
create
(
BlogCategory
::
class
,
[
'name'
=>
'Dog'
]);
$dogCategory
=
create
(
BlogCategory
::
class
,
[
'name'
=>
'Dog'
]);
$this
->
patch
(
route
(
'admin.blogCategories.update'
,
$dogCategory
),
$this
->
patch
(
route
(
'admin.blogCategories.update'
,
$dogCategory
),
[
'name'
=>
'Cat'
]
[
'name'
=>
'Cat'
]
)
->
assertSessionHasErrors
(
'name'
);
;
)
->
assertSessionHasErrors
(
'name'
);
}
}
}
}
tests/Feature/Backend/ManageBlogTagsTest.php
View file @
0400bf07
...
@@ -76,7 +76,7 @@ class ManageBlogTagsTest extends TestCase
...
@@ -76,7 +76,7 @@ class ManageBlogTagsTest extends TestCase
$this
->
assertDatabaseMissing
(
config
(
'module.blog_tags.table'
),
[
'name'
=>
$tag
->
name
,
'id'
=>
$tag
->
id
,
'deleted_at'
=>
null
]);
$this
->
assertDatabaseMissing
(
config
(
'module.blog_tags.table'
),
[
'name'
=>
$tag
->
name
,
'id'
=>
$tag
->
id
,
'deleted_at'
=>
null
]);
}
}
/** @test */
/** @test */
public
function
a_user_can_not_update_a_blog_tag_with_same_name
()
public
function
a_user_can_not_update_a_blog_tag_with_same_name
()
{
{
...
@@ -84,8 +84,8 @@ class ManageBlogTagsTest extends TestCase
...
@@ -84,8 +84,8 @@ class ManageBlogTagsTest extends TestCase
$catTag
=
create
(
BlogTag
::
class
,
[
'name'
=>
'Cat'
]);
$catTag
=
create
(
BlogTag
::
class
,
[
'name'
=>
'Cat'
]);
$dogTag
=
create
(
BlogTag
::
class
,
[
'name'
=>
'Dog'
]);
$dogTag
=
create
(
BlogTag
::
class
,
[
'name'
=>
'Dog'
]);
$this
->
patch
(
route
(
'admin.blogTags.update'
,
$dogTag
),
$this
->
patch
(
route
(
'admin.blogTags.update'
,
$dogTag
),
[
'name'
=>
'Cat'
]
[
'name'
=>
'Cat'
]
)
->
assertSessionHasErrors
(
'name'
);
)
->
assertSessionHasErrors
(
'name'
);
}
}
...
...
tests/Feature/Backend/ManageBlogsTest.php
View file @
0400bf07
...
@@ -205,8 +205,8 @@ class ManageBlogsTest extends TestCase
...
@@ -205,8 +205,8 @@ class ManageBlogsTest extends TestCase
$catCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Cat'
]);
$catCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Cat'
]);
$dogCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Dog'
]);
$dogCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Dog'
]);
$this
->
patch
(
route
(
'admin.blogs.update'
,
$dogCategory
),
$this
->
patch
(
route
(
'admin.blogs.update'
,
$dogCategory
),
[
'name'
=>
'Cat'
]
[
'name'
=>
'Cat'
]
)
->
assertSessionHasErrors
(
'name'
);
;
)
->
assertSessionHasErrors
(
'name'
);
}
}
}
}
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