Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Menu not adding in Admin

    General Discussion
    3
    6
    362
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deepaksharma1011 last edited by

      Hi,

      When i try to add menu through menu.php file under config directory. Menu does not come in sidebar in admin.
      below is my code for adding menu "Commission Rule"

      [
      'key' => 'commission-rule',
      'name' => 'admin::app.layouts.commission-rule',
      'route' => 'admin.commission-rule',
      'sort' => 11,
      'icon-class' => ''
      ],

      Can you please guide me about it

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @deepaksharma1011,

        Whenever you do some changes in the menu, just run this command,
        php artisan optimize or php artisan config:cache

        1 Reply Last reply Reply Quote 0
        • B
          Balthazar last edited by

          But in which file is the route command to be placed?
          I checked here: https://devdocs.bagisto.com/1.x/packages/add-menu-in-admin.html
          but I don't know which file to use.

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            Route command?

            I am not getting what you are trying to say.

            1 Reply Last reply Reply Quote 0
            • B
              Balthazar last edited by Balthazar

              It's this one:

              For the route, just add the named route which specified above i.e. helloworld.admin.index,

              Route::view('/admin/hello-world', 'helloworld::admin.index')->name('helloworld.admin.index');

              But I'm missing the information in which file to put it.

              I tried routes/web.php but that results in missing route error.
              Somwhere down this route I had an object error saying that a 'name' is not accessible. Now everytime I try to admin login I get an "419 expired" error.

              1 Reply Last reply Reply Quote 0
              • devansh-webkul
                devansh-webkul last edited by

                After updating any route just run php artisan optimize command. Because routes are cached.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post