Download the PHP package blimundo/laravel-menu without Composer

On this page you can find all versions of the php package blimundo/laravel-menu. 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 laravel-menu

Menu management for Laravel applications

Menu management in Laravel made simple and painless. This package does not provide any UI, focusing only on functionality to store and display the menu.

Items can be displayed in different languages thanks to the spatie/laravel-translatable package.

Requirements

This package requires Laravel 8 or higher, PHP 8 or higher, and a database that supports json fields and MySQL compatible functions.

Installation

You can install the package via composer:

The package will automatically register itself.

After install you can create the menus table by running the migrations:

A MenuGenerator alias will be available to application.

Example

Persisting the menu in the database

To create and persist the menu in the database, you can use the Builder class. In the example below, two menu entries are created:

Translations

To define multiple languages, just pass an array to the add() method, where the key is the language code. Internally the package uses spatie/laravel-translatable to manage translations.

Url

You have 3 options to generate urls:

Icon

To associate an icon to the menu just call the icon() function

Order

To set the item order just call the order() function.

Items with the same order (or that have no defined order) are sorted alphabetically according to the current language.

Gates

Sometimes we want the menu to appear only if the user has certain permissions. This package makes this a breeze. Just call the gates() function with the name of the gate. When generating the menu, the package tests the gate and if it passes the menu is included.

If you need to test more than one gate, just pass a list. The menu is only displayed if all gates return true.

Submenu

To create a submenu call the items() function, passing a callback. All menus created within the callback will be associated with the menu.

License

The Laravel Menu is open-sourced software licensed under the MIT license.


All versions of laravel-menu with dependencies

PHP Build Version
Package Version
Requires spatie/laravel-translatable Version ^6.0
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 blimundo/laravel-menu contains the following files

Loading the files please wait ....