Commit e9ad8276 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 32d3c4b8
......@@ -2,15 +2,15 @@
namespace App\Http\Controllers\Backend\Pages;
use App\Models\Page\Page;
use App\Http\Controllers\Controller;
use App\Repositories\Backend\Pages\PagesRepository;
use App\Http\Requests\Backend\Pages\EditPageRequest;
use App\Http\Requests\Backend\Pages\StorePageRequest;
use App\Http\Requests\Backend\Pages\CreatePageRequest;
use App\Http\Requests\Backend\Pages\DeletePageRequest;
use App\Http\Requests\Backend\Pages\EditPageRequest;
use App\Http\Requests\Backend\Pages\ManagePageRequest;
use App\Http\Requests\Backend\Pages\StorePageRequest;
use App\Http\Requests\Backend\Pages\UpdatePageRequest;
use App\Models\Page\Page;
use App\Repositories\Backend\Pages\PagesRepository;
/**
* Class PagesController.
......
......@@ -2,11 +2,11 @@
namespace App\Http\Controllers\Backend\Pages;
use Carbon\Carbon;
use App\Http\Controllers\Controller;
use Yajra\DataTables\Facades\DataTables;
use App\Repositories\Backend\Pages\PagesRepository;
use App\Http\Requests\Backend\Pages\ManagePageRequest;
use App\Repositories\Backend\Pages\PagesRepository;
use Carbon\Carbon;
use Yajra\DataTables\Facades\DataTables;
/**
* Class PagesTableController.
......
......@@ -4,8 +4,8 @@ namespace App\Models\Page;
use App\Models\BaseModel;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Page\Traits\Attribute\PageAttribute;
use Illuminate\Database\Eloquent\SoftDeletes;
class Page extends BaseModel
{
......
......@@ -2,12 +2,12 @@
namespace App\Repositories\Backend\Pages;
use App\Models\Page\Page;
use App\Exceptions\GeneralException;
use App\Repositories\BaseRepository;
use App\Events\Backend\Pages\PageCreated;
use App\Events\Backend\Pages\PageDeleted;
use App\Events\Backend\Pages\PageUpdated;
use App\Exceptions\GeneralException;
use App\Models\Page\Page;
use App\Repositories\BaseRepository;
/**
* Class PagesRepository.
......@@ -52,8 +52,9 @@ class PagesRepository extends BaseRepository
$input['status'] = isset($input['status']) ? 1 : 0;
$input['created_by'] = access()->user()->id;
if( $page = Page::create($input) ) {
if ($page = Page::create($input)) {
event(new PageCreated($page));
return true;
}
......@@ -79,7 +80,7 @@ class PagesRepository extends BaseRepository
$input['status'] = isset($input['status']) ? 1 : 0;
$input['updated_by'] = access()->user()->id;
if ( $page->update($input) ) {
if ($page->update($input)) {
event(new PageUpdated($page));
return true;
......@@ -97,7 +98,7 @@ class PagesRepository extends BaseRepository
*/
public function delete($page)
{
if ( $page->delete() ) {
if ($page->delete()) {
event(new PageDeleted($page));
return true;
......
......@@ -2,6 +2,6 @@
return [
'pages' => [
'table' => 'pages'
]
'table' => 'pages',
],
];
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