Search code examples
phplaravelmoduleadminlte

Laravel AdminLTE with Nwidart module menu option


I'm trying to call a module route from an AdminLTE submenu but it says:

syntax error, unexpected token ":", expecting "("

I'm writing at the top of file 'views/vendor/partials/sidebar/menu-item-link.blade.php' 2 lines but it is probably breaking with the first one:

@if( !isset($item['module']) || (Module::has($item['module']) )

And of course in the adminlte.php configuration file I add a 'module'=>'' to the menu item.

Am I doing something wrong?

thanks.


Solution

  • Hi and welcome to StackOverflow,

    It seems there is an extra opening parenthesis in your code (the one before "Module"). Try with this instead:

    @if( !isset($item['module']) || Module::has($item['module']) )