29 lines
670 B
PHP
29 lines
670 B
PHP
<?php
|
|
|
|
namespace Paymenter\Extensions\Others\NavbarManager\Helpers;
|
|
|
|
use Paymenter\Extensions\Others\NavbarManager\View\Components\NavigationLinks;
|
|
|
|
class NavbarHelper
|
|
{
|
|
/**
|
|
* Get navbar links for specified type
|
|
*/
|
|
public static function getLinks($type = 'primary')
|
|
{
|
|
$component = new NavigationLinks($type);
|
|
return $component->links;
|
|
}
|
|
|
|
/**
|
|
* Render navbar links component
|
|
*/
|
|
public static function render($type = 'primary', $class = '')
|
|
{
|
|
return view('navbar-manager::components.navigation-links', [
|
|
'links' => self::getLinks($type),
|
|
'class' => $class
|
|
]);
|
|
}
|
|
}
|