Download the PHP package acerex/filament-menux without Composer

On this page you can find all versions of the php package acerex/filament-menux. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-menux

Good or bad, you decide.

Latest Version on Packagist Total Downloads

Inspired by existing menu builders, but simplified and easier to customize. Most of the customizations might look trivial, but having to roll your own custom resource and extending the plugin's classes to customize these little things can sometimes become a pain-in-ass (At least in my experience).

Table of Contents

Installation

You can install the package via composer:

You can publish and run the migrations with:

Optionally, you can publish the views using

And also you need to add the plugin as a source in the theme css.

Example Usage

To start using, add the plugin to the panel you want.

Registering to panel

Just like any other panel plugins, you can register this in your panel provider

Static Menus

With static menus you can limit how many menus can be created except the menus you provided. This is useful, especially for projects where the frontend fetches the menus statically via slug. To pass static menus, you pass the menus to the useStaticMenus method. If you want the plugin to check and create the defined static menus on boot, pass the third second parameter boolean value. By default, it is disabled.

Static Menu Items

Static menu items are shown menu items that you provide from the panel configuration. You can add static menu items like this.

The third argument is optional and can also be any type of backed enum. For consistency, you should use the enum you use for the item form. See Using custom link target enum

Grouped Static Menu Items

You can also pass grouped static menu items. For example:

Or you can pass a function that returns an array. For example:

The passed function is deferred till the plugin is fully booted.

Add Model-Based Menu Items

Inspired by Menu Builder by Ngô Quốc Đạt, this plugin supports registering models and rendering them into menu item list selection.

The model must implement interfaces;

For example;

Set Records Per Page For Menu-Based Menu Items

By default, all menuxable menus are paginated with four records per page. However, you can customize this by providing the number of records you want to query per page via:

Using Custom Models

You can pass your custom models instead of using the default model classes

For Custom Menu Model

Note: Your custom model must extend the plugin's model.

For Custom Menu Item Model

Note: Your custom model must extend the plugin's model.

Modifying the Base Resource Class

The plugin supports modifying the base resource class without having to extend the base class.

Navigation Group

To Set navigation group of the resource, you can do it like this:

Navigation Label

To Set the navigation label of the resource, you can do it like this:

Navigation Icon

To set the navigation icon of the resource, you can do it like this:

Custom Forms and Table

The plugin also allows you to set custom form and table.

Custom Menu Form With Traditional Class

The custom form must extend the plugin's class. For example:

Custom Menu Form With Anonymouse Class

Also, you can pass the anonymouse class

Custom Menus Table

You can also pass custom menus table with both traditional class and function that returns anonymouse class that extends the base MenuTables class, For example.

or

Custom Menu Item Form

You can also use your own custom menu item form. Pass your menu item for the class that extends the plugin base class.

You can also pass callable that returns anonymouse class too.

To modify the creation of menu items, see the Action Modifiers section.

Action Modifiers

You can modify actions defined in the . List of actions modifiable via the panel,

To modify each action, you pass the action type and return the Action instance. For example, with closure:

Here the closure receives the Filament Action instance, and the plugin merges it with the default configurations.

Also, you can pass class-based Action Modifiers. For example,

and in the panel register the modifier

Using Custom Link Target Enum

By default, the plugin uses for model cast and inside menu item form. But sometimes, you would like to show fewer options or modify the labeling. Or add some more functionality. To do that, you can pass your own enum, and that enum will be used inside the menu item form and the model cast.

The custom enum must implement two interfaces;

For example

License

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


All versions of filament-menux with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0
kalnoy/nestedset Version ^6.0
spatie/laravel-package-tools Version ^1.15.0
spatie/laravel-sluggable Version ^3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package acerex/filament-menux contains the following files

Loading the files please wait ...