Use Menus package Styde/html
This file contains 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
{!! $principal->boot() !!} |
This file contains 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 Modules\Dashboard\Http\Controllers; | |
use Modules\Dashboard\Repositories\DashboardRepository; | |
use Pingpong\Modules\Routing\Controller; | |
use Modules\Dashboard\Menus\PrincipalMenu; | |
class FrontendController extends Controller { | |
/** | |
* @var DashboardRepository | |
*/ | |
private $dashboard; | |
public function __construct(DashboardRepository $dashboard) | |
{ | |
$this->dashboard = $dashboard; | |
} | |
public function index() | |
{ | |
$data = $this->dashboard->all()[0]; | |
$principal = new PrincipalMenu(); | |
return view('dashboard::frontend', compact('data', 'principal')); | |
} | |
} |
@sileence I work with modules and the package was not translations, so I had to use trans ()
As introducing an icon menu item
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, nice implementation, btw, read the documentation, the base component allows translation out of the box,you don't need to write:
'title' => trans(...)