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;
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);
}
/**
......
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
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