Created
June 3, 2017 20:05
-
-
Save tabuna/0638cff6b86095f1563fdd6d11d82bd7 to your computer and use it in GitHub Desktop.
MenuWidget.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Http\Widgets; | |
use Orchid\Widget\Service\Widget; | |
use Orchid\Core\Models\Menu; | |
class MenuWidget extends Widget { | |
/** | |
* @return mixed | |
*/ | |
public function run() | |
{ | |
$menu = Menu::where('lang', config('app.locale')) | |
->whereNull('parent') | |
->where('type', 'header')->get(); | |
return view('partials.menu', [ | |
'menu' => $menu, | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment