Unverified Commit eb0b0f0b authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #71 from viralsolani/analysis-q5g71B

Apply fixes from StyleCI
parents 1a5072e4 2fb416e8
...@@ -62,7 +62,7 @@ class BlogCategoriesController extends Controller ...@@ -62,7 +62,7 @@ class BlogCategoriesController extends Controller
} }
/** /**
* @param \App\Models\BlogCategories\BlogCategory $blogcategory * @param \App\Models\BlogCategories\BlogCategory $blogcategory
* @param \App\Http\Requests\Backend\BlogCategories\EditBlogCategoriesRequest $request * @param \App\Http\Requests\Backend\BlogCategories\EditBlogCategoriesRequest $request
* *
* @return mixed * @return mixed
...@@ -74,7 +74,7 @@ class BlogCategoriesController extends Controller ...@@ -74,7 +74,7 @@ class BlogCategoriesController extends Controller
} }
/** /**
* @param \App\Models\BlogCategories\BlogCategory $blogcategory * @param \App\Models\BlogCategories\BlogCategory $blogcategory
* @param \App\Http\Requests\Backend\BlogCategories\UpdateBlogCategoriesRequest $request * @param \App\Http\Requests\Backend\BlogCategories\UpdateBlogCategoriesRequest $request
* *
* @return mixed * @return mixed
...@@ -89,7 +89,7 @@ class BlogCategoriesController extends Controller ...@@ -89,7 +89,7 @@ class BlogCategoriesController extends Controller
} }
/** /**
* @param \App\Models\BlogCategories\BlogCategory $blogcategory * @param \App\Models\BlogCategories\BlogCategory $blogcategory
* @param \App\Http\Requests\Backend\BlogCategories\DeleteBlogCategoriesRequest $request * @param \App\Http\Requests\Backend\BlogCategories\DeleteBlogCategoriesRequest $request
* *
* @return mixed * @return mixed
......
...@@ -65,7 +65,7 @@ class BlogTagsController extends Controller ...@@ -65,7 +65,7 @@ class BlogTagsController extends Controller
} }
/** /**
* @param \App\Models\BlogTags\BlogTag $blogtag * @param \App\Models\BlogTags\BlogTag $blogtag
* @param \App\Http\Requests\Backend\BlogTags\EditBlogTagsRequest $request * @param \App\Http\Requests\Backend\BlogTags\EditBlogTagsRequest $request
* *
* @return mixed * @return mixed
...@@ -77,7 +77,7 @@ class BlogTagsController extends Controller ...@@ -77,7 +77,7 @@ class BlogTagsController extends Controller
} }
/** /**
* @param \App\Models\BlogTags\BlogTag $blogtag * @param \App\Models\BlogTags\BlogTag $blogtag
* @param \App\Http\Requests\Backend\BlogTags\UpdateBlogTagsRequest $request * @param \App\Http\Requests\Backend\BlogTags\UpdateBlogTagsRequest $request
* *
* @return mixed * @return mixed
...@@ -92,7 +92,7 @@ class BlogTagsController extends Controller ...@@ -92,7 +92,7 @@ class BlogTagsController extends Controller
} }
/** /**
* @param \App\Models\BlogTags\BlogTag $blogtag * @param \App\Models\BlogTags\BlogTag $blogtag
* @param \App\Http\Requests\Backend\BlogTags\DeleteBlogTagsRequest $request * @param \App\Http\Requests\Backend\BlogTags\DeleteBlogTagsRequest $request
* *
* @return mixed * @return mixed
......
...@@ -58,7 +58,7 @@ class BlogsController extends Controller ...@@ -58,7 +58,7 @@ class BlogsController extends Controller
*/ */
public function create(ManageBlogsRequest $request) public function create(ManageBlogsRequest $request)
{ {
$blogTags = BlogTag::getSelectData(); $blogTags = BlogTag::getSelectData();
$blogCategories = BlogCategory::getSelectData(); $blogCategories = BlogCategory::getSelectData();
return view('backend.blogs.create')->with([ return view('backend.blogs.create')->with([
...@@ -83,7 +83,7 @@ class BlogsController extends Controller ...@@ -83,7 +83,7 @@ class BlogsController extends Controller
} }
/** /**
* @param \App\Models\Blogs\Blog $blog * @param \App\Models\Blogs\Blog $blog
* @param \App\Http\Requests\Backend\Blogs\ManageBlogsRequest $request * @param \App\Http\Requests\Backend\Blogs\ManageBlogsRequest $request
* *
* @return mixed * @return mixed
...@@ -107,7 +107,7 @@ class BlogsController extends Controller ...@@ -107,7 +107,7 @@ class BlogsController extends Controller
} }
/** /**
* @param \App\Models\Blogs\Blog $blog * @param \App\Models\Blogs\Blog $blog
* @param \App\Http\Requests\Backend\Blogs\UpdateBlogsRequest $request * @param \App\Http\Requests\Backend\Blogs\UpdateBlogsRequest $request
* *
* @return mixed * @return mixed
...@@ -124,7 +124,7 @@ class BlogsController extends Controller ...@@ -124,7 +124,7 @@ class BlogsController extends Controller
} }
/** /**
* @param \App\Models\Blogs\Blog $blog * @param \App\Models\Blogs\Blog $blog
* @param \App\Http\Requests\Backend\Blogs\ManageBlogsRequest $request * @param \App\Http\Requests\Backend\Blogs\ManageBlogsRequest $request
* *
* @return mixed * @return mixed
......
...@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Backend\Blogs; ...@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Backend\Blogs;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Requests\Backend\Blogs\ManageBlogsRequest; use App\Http\Requests\Backend\Blogs\ManageBlogsRequest;
use App\Repositories\Backend\Blogs\BlogsRepository; use App\Repositories\Backend\Blogs\BlogsRepository;
use Carbon\Carbon;
use Yajra\DataTables\Facades\DataTables; use Yajra\DataTables\Facades\DataTables;
/** /**
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
namespace App\Http\Controllers\Backend\Faqs; namespace App\Http\Controllers\Backend\Faqs;
use App\Models\Faqs\Faq;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Repositories\Backend\Faqs\FaqsRepository;
use App\Http\Requests\Backend\Faqs\EditFaqsRequest; use App\Http\Requests\Backend\Faqs\EditFaqsRequest;
use App\Http\Requests\Backend\Faqs\ManageFaqsRequest; use App\Models\Faqs\Faq;
use App\Repositories\Backend\Faqs\FaqsRepository;
class FaqStatusController extends Controller class FaqStatusController extends Controller
{ {
...@@ -19,8 +18,8 @@ class FaqStatusController extends Controller ...@@ -19,8 +18,8 @@ class FaqStatusController extends Controller
{ {
$this->faq = $faq; $this->faq = $faq;
} }
/** /**
* @param \App\Models\Faqs\Faq $Faq * @param \App\Models\Faqs\Faq $Faq
* @param $status * @param $status
* @param \App\Http\Requests\Backend\Faqs\ManageFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\ManageFaqsRequest $request
...@@ -35,4 +34,4 @@ class FaqStatusController extends Controller ...@@ -35,4 +34,4 @@ class FaqStatusController extends Controller
->route('admin.faqs.index') ->route('admin.faqs.index')
->with('flash_success', trans('alerts.backend.faqs.updated')); ->with('flash_success', trans('alerts.backend.faqs.updated'));
} }
} }
\ No newline at end of file
...@@ -26,8 +26,9 @@ class FaqsController extends Controller ...@@ -26,8 +26,9 @@ class FaqsController extends Controller
/** /**
* Display a listing of the resource. * Display a listing of the resource.
*
* @param \App\Http\Requests\Backend\Faqs\ManageFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\ManageFaqsRequest $request
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function index(ManageFaqsRequest $request) public function index(ManageFaqsRequest $request)
...@@ -37,8 +38,9 @@ class FaqsController extends Controller ...@@ -37,8 +38,9 @@ class FaqsController extends Controller
/** /**
* Show the form for creating a new resource. * Show the form for creating a new resource.
*
* @param \App\Http\Requests\Backend\Faqs\CreateFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\CreateFaqsRequest $request
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function create(CreateFaqsRequest $request) public function create(CreateFaqsRequest $request)
...@@ -48,6 +50,7 @@ class FaqsController extends Controller ...@@ -48,6 +50,7 @@ class FaqsController extends Controller
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*
* @param \App\Http\Requests\Backend\Faqs\StoreFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\StoreFaqsRequest $request
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
...@@ -66,7 +69,7 @@ class FaqsController extends Controller ...@@ -66,7 +69,7 @@ class FaqsController extends Controller
/** /**
* Show the form for editing the specified resource. * Show the form for editing the specified resource.
* *
* @param \App\Models\Faqs\Faq $faq * @param \App\Models\Faqs\Faq $faq
* @param \App\Http\Requests\Backend\Faqs\EditFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\EditFaqsRequest $request
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
...@@ -81,7 +84,7 @@ class FaqsController extends Controller ...@@ -81,7 +84,7 @@ class FaqsController extends Controller
* Update the specified resource in storage. * Update the specified resource in storage.
* *
* @param \App\Http\Requests\Backend\Faqs\UpdateFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\UpdateFaqsRequest $request
* @param \App\Models\Faqs\Faq $id * @param \App\Models\Faqs\Faq $id
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
...@@ -99,7 +102,7 @@ class FaqsController extends Controller ...@@ -99,7 +102,7 @@ class FaqsController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *
* @param \App\Models\Faqs\Faq $faq * @param \App\Models\Faqs\Faq $faq
* @param \App\Http\Requests\Backend\Faqs\DeleteFaqsRequest $request * @param \App\Http\Requests\Backend\Faqs\DeleteFaqsRequest $request
* *
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
......
...@@ -17,7 +17,7 @@ trait BlogTagAttribute ...@@ -17,7 +17,7 @@ trait BlogTagAttribute
'.$this->getDeleteButtonAttribute('delete-blog-tag', 'admin.blogtags.destroy').' '.$this->getDeleteButtonAttribute('delete-blog-tag', 'admin.blogtags.destroy').'
</div>'; </div>';
} }
/** /**
* @return string * @return string
*/ */
......
...@@ -28,13 +28,13 @@ class Blog extends BaseModel ...@@ -28,13 +28,13 @@ class Blog extends BaseModel
'meta_description', 'meta_description',
'status', 'status',
'featured_image', 'featured_image',
'created_by' 'created_by',
]; ];
protected $dates = [ protected $dates = [
'publish_datetime', 'publish_datetime',
'created_at', 'created_at',
'updated_at' 'updated_at',
]; ];
/** /**
......
...@@ -81,7 +81,7 @@ class BlogCategoriesRepository extends BaseRepository ...@@ -81,7 +81,7 @@ class BlogCategoriesRepository extends BaseRepository
DB::transaction(function () use ($blogcategory, $input) { DB::transaction(function () use ($blogcategory, $input) {
$input['status'] = isset($input['status']) ? 1 : 0; $input['status'] = isset($input['status']) ? 1 : 0;
$input['updated_by'] = access()->user()->id; $input['updated_by'] = access()->user()->id;
if ($blogcategory->update($input)) { if ($blogcategory->update($input)) {
event(new BlogCategoryUpdated($blogcategory)); event(new BlogCategoryUpdated($blogcategory));
......
...@@ -81,7 +81,7 @@ class BlogTagsRepository extends BaseRepository ...@@ -81,7 +81,7 @@ class BlogTagsRepository extends BaseRepository
DB::transaction(function () use ($blogtag, $input) { DB::transaction(function () use ($blogtag, $input) {
$input['status'] = isset($input['status']) ? 1 : 0; $input['status'] = isset($input['status']) ? 1 : 0;
$input['updated_by'] = access()->user()->id; $input['updated_by'] = access()->user()->id;
if ($blogtag->update($input)) { if ($blogtag->update($input)) {
event(new BlogTagUpdated($blogtag)); event(new BlogTagUpdated($blogtag));
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
namespace App\Repositories\Backend\Blogs; namespace App\Repositories\Backend\Blogs;
use DB;
use Carbon\Carbon;
use App\Models\Blogs\Blog;
use App\Models\BlogTags\BlogTag;
use App\Http\Utilities\FileUploads;
use App\Exceptions\GeneralException;
use App\Repositories\BaseRepository;
use App\Models\BlogMapTags\BlogMapTag;
use App\Events\Backend\Blogs\BlogUpdated;
use App\Events\Backend\Blogs\BlogCreated; use App\Events\Backend\Blogs\BlogCreated;
use App\Events\Backend\Blogs\BlogDeleted; use App\Events\Backend\Blogs\BlogDeleted;
use App\Events\Backend\Blogs\BlogUpdated;
use App\Exceptions\GeneralException;
use App\Http\Utilities\FileUploads;
use App\Models\BlogCategories\BlogCategory; use App\Models\BlogCategories\BlogCategory;
use App\Models\BlogMapCategories\BlogMapCategory; use App\Models\BlogMapCategories\BlogMapCategory;
use App\Models\BlogMapTags\BlogMapTag;
use App\Models\Blogs\Blog;
use App\Models\BlogTags\BlogTag;
use App\Repositories\BaseRepository;
use Carbon\Carbon;
use DB;
/** /**
* Class BlogsRepository. * Class BlogsRepository.
...@@ -57,12 +57,12 @@ class BlogsRepository extends BaseRepository ...@@ -57,12 +57,12 @@ class BlogsRepository extends BaseRepository
$categoriesArray = $this->createCategories($input['categories']); $categoriesArray = $this->createCategories($input['categories']);
unset($input['tags'], $input['categories']); unset($input['tags'], $input['categories']);
DB::transaction(function () use ($input, $tagsArray, $categoriesArray) { DB::transaction(function () use ($input, $tagsArray, $categoriesArray) {
$input['slug'] = str_slug($input['name']); $input['slug'] = str_slug($input['name']);
$input['publish_datetime'] = Carbon::parse($input['publish_datetime']); $input['publish_datetime'] = Carbon::parse($input['publish_datetime']);
$input = $this->uploadImage($input); $input = $this->uploadImage($input);
$input['created_by'] = access()->user()->id; $input['created_by'] = access()->user()->id;
if ($blog = Blog::create($input)) { if ($blog = Blog::create($input)) {
// Inserting associated category's id in mapper table // Inserting associated category's id in mapper table
if (count($categoriesArray)) { if (count($categoriesArray)) {
...@@ -87,7 +87,7 @@ class BlogsRepository extends BaseRepository ...@@ -87,7 +87,7 @@ class BlogsRepository extends BaseRepository
* Update Blog. * Update Blog.
* *
* @param \App\Models\Blogs\Blog $blog * @param \App\Models\Blogs\Blog $blog
* @param array $input * @param array $input
*/ */
public function update(Blog $blog, array $input) public function update(Blog $blog, array $input)
{ {
......
...@@ -52,7 +52,7 @@ class FaqsRepository extends BaseRepository ...@@ -52,7 +52,7 @@ class FaqsRepository extends BaseRepository
/** /**
* @param \App\Models\Faqs\Faq $faq * @param \App\Models\Faqs\Faq $faq
* @param array $input * @param array $input
* *
* @throws \App\Exceptions\GeneralException * @throws \App\Exceptions\GeneralException
* *
...@@ -88,7 +88,7 @@ class FaqsRepository extends BaseRepository ...@@ -88,7 +88,7 @@ class FaqsRepository extends BaseRepository
/** /**
* @param \App\Models\Faqs\Faq $faq * @param \App\Models\Faqs\Faq $faq
* @param string $status * @param string $status
* *
* @throws \App\Exceptions\GeneralException * @throws \App\Exceptions\GeneralException
* *
......
...@@ -50,4 +50,4 @@ return [ ...@@ -50,4 +50,4 @@ return [
* Note: you cannot use both layout-boxed and fixed at the same time. Anything else can be mixed together. * Note: you cannot use both layout-boxed and fixed at the same time. Anything else can be mixed together.
*/ */
'layout' => 'sidebar-mini', 'layout' => 'sidebar-mini',
]; ];
\ No newline at end of file
...@@ -10,15 +10,15 @@ return [ ...@@ -10,15 +10,15 @@ return [
'types_table' => 'email_template_types', 'types_table' => 'email_template_types',
], ],
'blog_tags' => [ 'blog_tags' => [
'table' => 'blog_tags' 'table' => 'blog_tags',
], ],
'blog_categories' => [ 'blog_categories' => [
'table' => 'blog_categories' 'table' => 'blog_categories',
], ],
'blogs' => [ 'blogs' => [
'table' => 'blogs' 'table' => 'blogs',
], ],
'faqs' => [ 'faqs' => [
'table' => 'faqs' 'table' => 'faqs',
] ],
]; ];
...@@ -9,4 +9,4 @@ Route::group(['namespace' => 'BlogTags'], function () { ...@@ -9,4 +9,4 @@ Route::group(['namespace' => 'BlogTags'], function () {
//For DataTables //For DataTables
Route::post('blogtags/get', 'BlogTagsTableController') Route::post('blogtags/get', 'BlogTagsTableController')
->name('blogtags.get'); ->name('blogtags.get');
}); });
\ No newline at end of file
...@@ -9,4 +9,4 @@ Route::group(['namespace' => 'Blogs'], function () { ...@@ -9,4 +9,4 @@ Route::group(['namespace' => 'Blogs'], function () {
//For DataTables //For DataTables
Route::post('blogs/get', 'BlogsTableController') Route::post('blogs/get', 'BlogsTableController')
->name('blogs.get'); ->name('blogs.get');
}); });
\ No newline at end of file
...@@ -11,4 +11,4 @@ Route::post('get-permission', 'DashboardController@getPermissionByRole')->name(' ...@@ -11,4 +11,4 @@ Route::post('get-permission', 'DashboardController@getPermissionByRole')->name('
*/ */
Route::get('profile/edit', 'DashboardController@editProfile')->name('profile.edit'); Route::get('profile/edit', 'DashboardController@editProfile')->name('profile.edit');
Route::patch('profile/update', 'DashboardController@updateProfile') Route::patch('profile/update', 'DashboardController@updateProfile')
->name('profile.update'); ->name('profile.update');
\ No newline at end of file
...@@ -11,4 +11,4 @@ Route::group(['namespace' => 'Faqs'], function () { ...@@ -11,4 +11,4 @@ Route::group(['namespace' => 'Faqs'], function () {
// Status // Status
Route::get('faqs/{faq}/mark/{status}', 'FaqStatusController@store')->name('faqs.mark')->where(['status' => '[0,1]']); Route::get('faqs/{faq}/mark/{status}', 'FaqStatusController@store')->name('faqs.mark')->where(['status' => '[0,1]']);
}); });
\ No newline at end of file
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
*/ */
Route::group(['namespace' => 'Settings'], function () { Route::group(['namespace' => 'Settings'], function () {
Route::resource('settings', 'SettingsController', ['except' => ['show', 'create', 'save', 'index', 'destroy']]); Route::resource('settings', 'SettingsController', ['except' => ['show', 'create', 'save', 'index', 'destroy']]);
Route::post('removeicon', 'SettingsController@removeIcon')->name('removeicon'); Route::post('removeicon', 'SettingsController@removeIcon')->name('removeicon');
}); });
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