Skip to content

Commit f84e928

Browse files
committed
Passing current url from controller to navigation class.
Fix support with Laravel 5.1
1 parent 4c28eff commit f84e928

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

resources/views/default/column/editable/checkbox.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="inline-editable"
44
data-name="{{ $name }}"
55
data-value="{{ $value }}"
6-
data-url="{{ url()->current() }}"
6+
data-url="{{ request()->url() }}"
77
data-type="checklist"
88
data-pk="{{ $id }}"
99
data-source="{ 1 : '{{ $checkedLabel }}' }"

src/Http/Controllers/AdminController.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ class AdminController extends Controller
2727
*/
2828
private $parentBreadcrumb = 'home';
2929

30-
public function __construct()
30+
/**
31+
* AdminController constructor.
32+
*
33+
* @param \Illuminate\Http\Request $request
34+
*/
35+
public function __construct(\Illuminate\Http\Request $request)
3136
{
3237
$this->navigation = app('sleeping_owl.navigation');
3338

39+
$this->navigation->setCurrentUrl($request->url());
40+
3441
Breadcrumbs::register('home', function($breadcrumbs) {
3542
$breadcrumbs->push('Dashboard', route('admin.dashboard'));
3643
});

0 commit comments

Comments
 (0)