Side menu problem after running `php artisan asgard:module:scaffold`



  • I was following a video,

    . Instead of New, news::abcs.title.abcs is in the side menu.

    When I see Modules/News/Sidebar/SidebarExtender.php, I found $item->item(trans('news::news.title.news')...

    Where does translation item locate?

    alt text


  • Global Moderator

    @shinokada

    trans('news::news.title.news') should be located in Modules/News/Resources/lang/en/news.php where key title should contain array with entry news.

    But all in all this happens because of how pluralization work in laravel.



  • Ok, thanks for info.
    But how to fix the problem? Do I need to add a translation of news::abcs.title.abcs in that file?

    Meanwhile I changed abcs to news.

    $group->item(trans('news::news.title.news'), function (Item $item) {...

  • Global Moderator

    You would just change manually those abcs to something that makes sense for you.
    Changing the way you did abcs to news should pick up correct translation and Sidebar group would be called News


Log in to reply