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
c743f803
Commit
c743f803
authored
Apr 29, 2018
by
Vipul Basapati
Committed by
StyleCI Bot
Apr 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fixes from StyleCI
parent
d5b43677
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
27 deletions
+23
-27
BlogsController.php
app/Http/Controllers/Backend/Blogs/BlogsController.php
+2
-2
CreateResponse.php
app/Http/Responses/Backend/Blog/CreateResponse.php
+6
-7
EditResponse.php
app/Http/Responses/Backend/Blog/EditResponse.php
+7
-8
IndexResponse.php
app/Http/Responses/Backend/Blog/IndexResponse.php
+3
-4
RedirectResponse.php
app/Http/Responses/RedirectResponse.php
+5
-6
No files found.
app/Http/Controllers/Backend/Blogs/BlogsController.php
View file @
c743f803
...
...
@@ -6,9 +6,9 @@ use App\Http\Controllers\Controller;
use
App\Http\Requests\Backend\Blogs\ManageBlogsRequest
;
use
App\Http\Requests\Backend\Blogs\StoreBlogsRequest
;
use
App\Http\Requests\Backend\Blogs\UpdateBlogsRequest
;
use
App\Http\Responses\Backend\Blog\IndexResponse
;
use
App\Http\Responses\Backend\Blog\CreateResponse
;
use
App\Http\Responses\Backend\Blog\EditResponse
;
use
App\Http\Responses\Backend\Blog\IndexResponse
;
use
App\Http\Responses\RedirectResponse
;
use
App\Models\BlogCategories\BlogCategory
;
use
App\Models\Blogs\Blog
;
...
...
@@ -89,7 +89,7 @@ class BlogsController extends Controller
$blogCategories
=
BlogCategory
::
getSelectData
();
$blogTags
=
BlogTag
::
getSelectData
();
return
new
EditResponse
(
$blog
,
$this
->
status
,
$blogCategories
,
$blogTags
);
return
new
EditResponse
(
$blog
,
$this
->
status
,
$blogCategories
,
$blogTags
);
}
/**
...
...
app/Http/Responses/Backend/Blog/CreateResponse.php
View file @
c743f803
...
...
@@ -6,9 +6,9 @@ use Illuminate\Contracts\Support\Responsable;
class
CreateResponse
implements
Responsable
{
protected
$status
,
$blogTags
,
$blogCategories
;
protected
$status
;
protected
$blogTags
;
protected
$blogCategories
;
public
function
__construct
(
$status
,
$blogCategories
,
$blogTags
)
{
...
...
@@ -16,8 +16,8 @@ class CreateResponse implements Responsable
$this
->
blogTags
=
$blogTags
;
$this
->
blogCategories
=
$blogCategories
;
}
public
function
toResponse
(
$request
)
public
function
toResponse
(
$request
)
{
return
view
(
'backend.blogs.create'
)
->
with
([
'blogCategories'
=>
$this
->
blogCategories
,
...
...
@@ -25,5 +25,4 @@ class CreateResponse implements Responsable
'status'
=>
$this
->
status
,
]);
}
}
\ No newline at end of file
}
app/Http/Responses/Backend/Blog/EditResponse.php
View file @
c743f803
...
...
@@ -6,10 +6,10 @@ use Illuminate\Contracts\Support\Responsable;
class
EditResponse
implements
Responsable
{
protected
$blog
,
$status
,
$blogTags
,
$blogCategories
;
protected
$blog
;
protected
$status
;
protected
$blogTags
;
protected
$blogCategories
;
public
function
__construct
(
$blog
,
$status
,
$blogCategories
,
$blogTags
)
{
...
...
@@ -18,8 +18,8 @@ class EditResponse implements Responsable
$this
->
blogTags
=
$blogTags
;
$this
->
blogCategories
=
$blogCategories
;
}
public
function
toResponse
(
$request
)
public
function
toResponse
(
$request
)
{
$selectedCategories
=
$this
->
blog
->
categories
->
pluck
(
'id'
)
->
toArray
();
$selectedtags
=
$this
->
blog
->
tags
->
pluck
(
'id'
)
->
toArray
();
...
...
@@ -33,5 +33,4 @@ class EditResponse implements Responsable
'status'
=>
$this
->
status
,
]);
}
}
\ No newline at end of file
}
app/Http/Responses/Backend/Blog/IndexResponse.php
View file @
c743f803
...
...
@@ -4,7 +4,7 @@ namespace App\Http\Responses\Backend\Blog;
use
Illuminate\Contracts\Support\Responsable
;
class
IndexResponse
implements
Responsable
class
IndexResponse
implements
Responsable
{
protected
$status
;
...
...
@@ -13,11 +13,10 @@ class IndexResponse implements Responsable
$this
->
status
=
$status
;
}
public
function
toResponse
(
$request
)
public
function
toResponse
(
$request
)
{
return
view
(
'backend.blogs.index'
)
->
with
([
'status'
=>
$this
->
status
,
]);
}
}
\ No newline at end of file
}
app/Http/Responses/RedirectResponse.php
View file @
c743f803
...
...
@@ -6,20 +6,19 @@ use Illuminate\Contracts\Support\Responsable;
class
RedirectResponse
implements
Responsable
{
protected
$route
,
$message
;
protected
$route
;
protected
$message
;
public
function
__construct
(
$route
,
$message
)
{
$this
->
route
=
$route
;
$this
->
message
=
$message
;
}
public
function
toResponse
(
$request
)
public
function
toResponse
(
$request
)
{
return
redirect
()
->
route
(
$this
->
route
)
->
with
(
$this
->
message
);
}
}
\ No newline at end of file
}
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