Skip to content

Commit

Permalink
add custome view to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed May 29, 2023
1 parent 76a7083 commit f87e9d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/tomato-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
* the class must return a full rendered menu.
*/
"menu_provider" => null,

/**
* if you need to change the main menu with your own menu file
*/
"menu_file" => null
];
2 changes: 2 additions & 0 deletions resources/views/layouts/includes/menu.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class="

@if(config('tomato-admin.menu_provider'))
{!! config('tomato-admin.menu_provider')::render() !!}
@elseif(config('tomato-admin.menu_file'))
@include(config('tomato-admin.menu_file'))
@else
@php $counter = 0; @endphp
@foreach($menus as $menu)
Expand Down

0 comments on commit f87e9d2

Please sign in to comment.