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