LaravelPackages.net
Acme Inc.
Toggle sidebar
3x1io/filament-menus

Menu View Generator Using Livewire

2.781
12
v1.0.1
About 3x1io/filament-menus

3x1io/filament-menus is a Laravel package for menu view generator using livewire. It currently has 12 GitHub stars and 2.781 downloads on Packagist (latest version v1.0.1). Install it with composer require 3x1io/filament-menus. Discover more Laravel packages by 3x1io or browse all Laravel packages to compare alternatives.

Last updated

Filament Menus

Menu View Generator Using Livewire

Installation

You can install the package via composer:

composer require 3x1io/filament-menus

load livewire component

php artisan livewire:discover

load migrations

php artisan migrate

and now clear cache

php artisan optimize:clear

Usage

go to route admin/menus and create a new menu and you will get the code of livewire component

you can build a menu just by using this command as a livewire component

@livewire('menu', ['key' => "header"])

where header is a key of menu and you will get the code ready on the Table list of menus

you can use custome view ex:

@livewire('menu', ['key' => "header", 'view'=> "livewire.menu"])

by default we use Tailwind as a main view with this code

@foreach ($menu as $item)
<a class="text-gray-500" href="{{ $item['url'] }}" @if($item['blank']) target="_blank" @endif>
    <span class="flex justify-between">
        @if(isset($item['icon']) && !empty($item['icon']))
        <x-icon class="w-4 h-4 mx-2" name="{{ $item['icon'] }}"></x-icon>
        @endif
        {{ $item['title'] }}
    </span>
</a>
@endforeach

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments