File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
resources/views/docs/1/the-basics Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -230,23 +230,28 @@ You may add a context menu to your menu bar icon. This context menu will be show
230230
231231![ Menu Bar Context Menu] ( /img/docs/menubar-context-menu.png )
232232
233- To add a context menu, you may use the ` contextMenu() ` method on the ` MenuBar ` .
234- This method accepts a ` Native\Laravel\Menu\Menu ` instance.
233+ To add a context menu to your Menu Bar app, you may use the ` withContextMenu() ` method on the ` MenuBar ` .
235234
236- To learn more about the menu builder, please refer to the [ Menu Builder ] ( /docs/the-basics/menu-builder ) documentation .
235+ This method accepts a ` Native\Laravel\Menu\Menu ` instance, which can be created using the ` Menu::make() ` method of the ` Menu ` facade .
237236
238237``` php
238+ use Native\Laravel\Facades\Menu;
239+
239240MenuBar::create()
240241 ->withContextMenu(
241- Menu::new()
242- ->label('My Application')
243- ->separator()
244- ->link('https://nativephp.com', 'Learn more…')
245- ->separator()
246- ->quit()
242+ Menu::make(
243+ Menu::label('My Application'),
244+ Menu::separator(),
245+ Menu::link('https://nativephp.com', 'Learn more…')
246+ ->openInBrowser(),
247+ Menu::separator(),
248+ Menu::quit()
249+ )
247250 );
248251```
249252
253+ To learn more about the ` Menu ` facade, please refer to the [ Application Menu] ( /docs/the-basics/application-menu ) documentation.
254+
250255## Events
251256
252257NativePHP provides a simple way to listen for menu bar events.
You can’t perform that action at this time.
0 commit comments