If you find this website useful, your sponsorship would greatly support its ongoing development and maintenance. Learn more

Navigation

Create a nav link using:
<x-nav.link route="admin.users" icon="fas fa-users">Users</x-nav.link>

nav.link takes these options:

  • route - The named route. # can be used instead of a named route. Required
  • icon - A Font Awesome icon. Optional

Create a nav select menu using:
<x-nav.group label="Settings" route="#" icon="fas fa-cogs">

nav.group takes these options:

  • label - The name of the menu item. Optional
  • route - The named route. # can be used instead of a named route. Required
  • icon - A Font Awesome icon. Optional
  • open - A boolean (true or false) to set the menu to be open or closed. The default is false when not set. Optional

Create a nav select menu link using:
<x-nav.group-item route="admin.settings" icon="far fa-circle">Settings</x-nav.group-item>

nav.group takes these options:

  • route - The named route. # can be used instead of a named route. Required
  • icon - A Font Awesome icon. Optional

Notice, this page uses the nav blade components for all the sidebar items in these docs.

To change the classes edit the blade component at:
resources/views/components/nav/link.blade.php
resources/views/components/tabs/group.blade.php
resources/views/components/tabs/group-link.blade.php

Example:


                
                    <div class="bg-primary p-1">
                        <x-nav.link route="admin" icon="fas fa-home">Dashboard</x-nav.link>
                        <x-nav.group label="Settings" route="admin.settings" icon="fas fa-cogs">
                            <x-nav.group-item route="admin.settings.audit-trails.index" icon="far fa-circle">Audit Trails</x-nav.group-item>
                            <x-nav.group-item route="admin.settings.sent-emails" icon="far fa-circle">Sent Emails</x-nav.group-item>
                        </x-nav.group>
                        <x-nav.link route="admin.users.index" icon="fas fa-users">Users</x-nav.link>
                    </div>
                            

© 2024 Laravel AdminTW. All rights reserved.

Built by David Carr