page_fix
This commit is contained in:
@@ -46,7 +46,7 @@ class ArticleController extends Controller
|
||||
// checking authentication
|
||||
$this->middleware('auth');
|
||||
// checking roles
|
||||
$this->middleware('roles');
|
||||
$this->middleware('role.agent');
|
||||
SettingsController::language();
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ class CategoryController extends Controller
|
||||
// checking authentication
|
||||
$this->middleware('auth');
|
||||
// checking roles
|
||||
$this->middleware('roles');
|
||||
$this->middleware('role.agent');
|
||||
SettingsController::language();
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,7 @@ class PageController extends Controller
|
||||
// checking authentication
|
||||
$this->middleware('auth');
|
||||
// checking roles
|
||||
$this->middleware('roles');
|
||||
$this->middleware('role.agent');
|
||||
$this->page = $page;
|
||||
SettingsController::language();
|
||||
}
|
||||
@@ -86,7 +86,7 @@ class PageController extends Controller
|
||||
/* add column Actions */
|
||||
/* there are action buttons and modal popup to delete a data column */
|
||||
->addColumn('Actions', function ($model) {
|
||||
return '<span data-toggle="modal" data-target="#deletepage'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').'</button></span> <a href=page/'.$model->slug.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a> <a href=pages/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
|
||||
return '<span data-toggle="modal" data-target="#deletepage'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').'</button></span> <a href=page/'.$model->id.'/edit class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a> <a href=pages/'.$model->slug.' class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
|
||||
<div class="modal fade" id="deletepage'.$model->id.'">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -150,7 +150,7 @@ class PageController extends Controller
|
||||
public function edit($slug)
|
||||
{
|
||||
try {
|
||||
$page = $this->page->where('slug', $slug)->first();
|
||||
$page = $this->page->where('id', $slug)->first();
|
||||
|
||||
return view('themes.default1.agent.kb.pages.edit', compact('page'));
|
||||
} catch (Exception $e) {
|
||||
@@ -169,7 +169,7 @@ class PageController extends Controller
|
||||
public function update($slug, PageRequest $request)
|
||||
{
|
||||
// get pages with respect to slug
|
||||
$pages = $this->page->where('slug', $slug)->first();
|
||||
$pages = $this->page->where('id', $slug)->first();
|
||||
$sl = $request->input('name');
|
||||
$slug = Str::slug($sl, '-');
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class SettingsController extends Controller
|
||||
// checking authentication
|
||||
$this->middleware('auth');
|
||||
// checking roles
|
||||
$this->middleware('roles');
|
||||
$this->middleware('role.agent');
|
||||
$this->language();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user