File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ final class CustomRouteProvider extends ServiceProvider
1313 */
1414 public function register (): void
1515 {
16+ $ this ->registerConfig ();
17+
1618 $ this ->app ->singleton ('sukristyan.menu ' , function () {
1719 return new RegisterMenu ();
1820 });
@@ -29,14 +31,23 @@ public function boot(): void
2931 });
3032
3133 Route::macro ('menu ' , function (string $ label ) {
32- RegisterMenu::add ($ this ->uri (), $ label );
34+ /** @var \Illuminate\Routing\Route $this */
35+ RegisterMenu::add ($ this , $ label );
3336 return $ this ;
3437 });
3538
3639 Route::macro ('group ' , function ($ attributes , $ routes ) {
3740 $ result = \Illuminate \Support \Facades \Route::buildGroup ($ attributes , $ routes );
38- RegisterMenu::endGroupping ();
41+ RegisterMenu::endGroup ();
3942 return $ result ;
4043 });
4144 }
45+
46+ public function registerConfig ()
47+ {
48+ $ this ->mergeConfigFrom (
49+ __DIR__ . '/../config/laravel-menu-wrapper.php ' ,
50+ 'laravel-menu-wrapper '
51+ );
52+ }
4253}
You can’t perform that action at this time.
0 commit comments