diff --git a/app/Http/Controllers/Agent/kb/ArticleController.php b/app/Http/Controllers/Agent/kb/ArticleController.php index 2a41a15491..bff8ecfb93 100644 --- a/app/Http/Controllers/Agent/kb/ArticleController.php +++ b/app/Http/Controllers/Agent/kb/ArticleController.php @@ -46,7 +46,7 @@ public function __construct() // checking authentication $this->middleware('auth'); // checking roles - $this->middleware('roles'); + $this->middleware('role.agent'); SettingsController::language(); } diff --git a/app/Http/Controllers/Agent/kb/CategoryController.php b/app/Http/Controllers/Agent/kb/CategoryController.php index bdf2b75b80..b0ba32ee65 100644 --- a/app/Http/Controllers/Agent/kb/CategoryController.php +++ b/app/Http/Controllers/Agent/kb/CategoryController.php @@ -40,7 +40,7 @@ public function __construct() // checking authentication $this->middleware('auth'); // checking roles - $this->middleware('roles'); + $this->middleware('role.agent'); SettingsController::language(); } @@ -150,9 +150,9 @@ public function store(Category $category, CategoryRequest $request) try { $category->fill($request->input())->save(); - return Redirect::back()->with('success', Lang::get('lang.category_inserted_successfully')); + return redirect('category')->with('success', Lang::get('lang.category_inserted_successfully')); } catch (Exception $e) { - return Redirect::back()->with('fails', Lang::get('lang.category_not_inserted').'
  • '.$e->getMessage().'
  • '); + return redirect('category')->with('fails', Lang::get('lang.category_not_inserted').'
  • '.$e->getMessage().'
  • '); } } diff --git a/app/Http/Controllers/Agent/kb/PageController.php b/app/Http/Controllers/Agent/kb/PageController.php index 1e2ff6dc76..c115e16311 100644 --- a/app/Http/Controllers/Agent/kb/PageController.php +++ b/app/Http/Controllers/Agent/kb/PageController.php @@ -38,7 +38,7 @@ public function __construct(Page $page) // checking authentication $this->middleware('auth'); // checking roles - $this->middleware('roles'); + $this->middleware('role.agent'); $this->page = $page; SettingsController::language(); } @@ -86,7 +86,7 @@ public function getData() /* add column Actions */ /* there are action buttons and modal popup to delete a data column */ ->addColumn('Actions', function ($model) { - return ' slug.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').' slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').' + return ' id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').' slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'