Commit c743f803 authored by Vipul Basapati's avatar Vipul Basapati Committed by StyleCI Bot

Apply fixes from StyleCI

parent d5b43677
...@@ -6,9 +6,9 @@ use App\Http\Controllers\Controller; ...@@ -6,9 +6,9 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\Backend\Blogs\ManageBlogsRequest; use App\Http\Requests\Backend\Blogs\ManageBlogsRequest;
use App\Http\Requests\Backend\Blogs\StoreBlogsRequest; use App\Http\Requests\Backend\Blogs\StoreBlogsRequest;
use App\Http\Requests\Backend\Blogs\UpdateBlogsRequest; 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\CreateResponse;
use App\Http\Responses\Backend\Blog\EditResponse; use App\Http\Responses\Backend\Blog\EditResponse;
use App\Http\Responses\Backend\Blog\IndexResponse;
use App\Http\Responses\RedirectResponse; use App\Http\Responses\RedirectResponse;
use App\Models\BlogCategories\BlogCategory; use App\Models\BlogCategories\BlogCategory;
use App\Models\Blogs\Blog; use App\Models\Blogs\Blog;
...@@ -89,7 +89,7 @@ class BlogsController extends Controller ...@@ -89,7 +89,7 @@ class BlogsController extends Controller
$blogCategories = BlogCategory::getSelectData(); $blogCategories = BlogCategory::getSelectData();
$blogTags = BlogTag::getSelectData(); $blogTags = BlogTag::getSelectData();
return new EditResponse($blog, $this->status, $blogCategories, $blogTags); return new EditResponse($blog, $this->status, $blogCategories, $blogTags);
} }
/** /**
......
...@@ -6,9 +6,9 @@ use Illuminate\Contracts\Support\Responsable; ...@@ -6,9 +6,9 @@ use Illuminate\Contracts\Support\Responsable;
class CreateResponse implements Responsable class CreateResponse implements Responsable
{ {
protected $status, protected $status;
$blogTags, protected $blogTags;
$blogCategories; protected $blogCategories;
public function __construct($status, $blogCategories, $blogTags) public function __construct($status, $blogCategories, $blogTags)
{ {
...@@ -16,8 +16,8 @@ class CreateResponse implements Responsable ...@@ -16,8 +16,8 @@ class CreateResponse implements Responsable
$this->blogTags = $blogTags; $this->blogTags = $blogTags;
$this->blogCategories = $blogCategories; $this->blogCategories = $blogCategories;
} }
public function toResponse($request) public function toResponse($request)
{ {
return view('backend.blogs.create')->with([ return view('backend.blogs.create')->with([
'blogCategories' => $this->blogCategories, 'blogCategories' => $this->blogCategories,
...@@ -25,5 +25,4 @@ class CreateResponse implements Responsable ...@@ -25,5 +25,4 @@ class CreateResponse implements Responsable
'status' => $this->status, 'status' => $this->status,
]); ]);
} }
}
}
\ No newline at end of file
...@@ -6,10 +6,10 @@ use Illuminate\Contracts\Support\Responsable; ...@@ -6,10 +6,10 @@ use Illuminate\Contracts\Support\Responsable;
class EditResponse implements Responsable class EditResponse implements Responsable
{ {
protected $blog, protected $blog;
$status, protected $status;
$blogTags, protected $blogTags;
$blogCategories; protected $blogCategories;
public function __construct($blog, $status, $blogCategories, $blogTags) public function __construct($blog, $status, $blogCategories, $blogTags)
{ {
...@@ -18,8 +18,8 @@ class EditResponse implements Responsable ...@@ -18,8 +18,8 @@ class EditResponse implements Responsable
$this->blogTags = $blogTags; $this->blogTags = $blogTags;
$this->blogCategories = $blogCategories; $this->blogCategories = $blogCategories;
} }
public function toResponse($request) public function toResponse($request)
{ {
$selectedCategories = $this->blog->categories->pluck('id')->toArray(); $selectedCategories = $this->blog->categories->pluck('id')->toArray();
$selectedtags = $this->blog->tags->pluck('id')->toArray(); $selectedtags = $this->blog->tags->pluck('id')->toArray();
...@@ -33,5 +33,4 @@ class EditResponse implements Responsable ...@@ -33,5 +33,4 @@ class EditResponse implements Responsable
'status' => $this->status, 'status' => $this->status,
]); ]);
} }
}
}
\ No newline at end of file
...@@ -4,7 +4,7 @@ namespace App\Http\Responses\Backend\Blog; ...@@ -4,7 +4,7 @@ namespace App\Http\Responses\Backend\Blog;
use Illuminate\Contracts\Support\Responsable; use Illuminate\Contracts\Support\Responsable;
class IndexResponse implements Responsable class IndexResponse implements Responsable
{ {
protected $status; protected $status;
...@@ -13,11 +13,10 @@ class IndexResponse implements Responsable ...@@ -13,11 +13,10 @@ class IndexResponse implements Responsable
$this->status = $status; $this->status = $status;
} }
public function toResponse($request) public function toResponse($request)
{ {
return view('backend.blogs.index')->with([ return view('backend.blogs.index')->with([
'status'=> $this->status, 'status'=> $this->status,
]); ]);
} }
}
}
\ No newline at end of file
...@@ -6,20 +6,19 @@ use Illuminate\Contracts\Support\Responsable; ...@@ -6,20 +6,19 @@ use Illuminate\Contracts\Support\Responsable;
class RedirectResponse implements Responsable class RedirectResponse implements Responsable
{ {
protected $route, protected $route;
$message; protected $message;
public function __construct($route, $message) public function __construct($route, $message)
{ {
$this->route = $route; $this->route = $route;
$this->message = $message; $this->message = $message;
} }
public function toResponse($request) public function toResponse($request)
{ {
return redirect() return redirect()
->route($this->route) ->route($this->route)
->with($this->message); ->with($this->message);
} }
}
}
\ No newline at end of file
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