Skip to content

Instantly share code, notes, and snippets.

@tabuna
Created June 3, 2017 20:05
Show Gist options
  • Save tabuna/0638cff6b86095f1563fdd6d11d82bd7 to your computer and use it in GitHub Desktop.
Save tabuna/0638cff6b86095f1563fdd6d11d82bd7 to your computer and use it in GitHub Desktop.
MenuWidget.php
<?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