Download the PHP package rspeekenbrink/laravel-menu without Composer

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

Laravel Menu

Latest Version on Packagist Total Downloads

Create menu objects server-sided without sweat for Front-End adoption.

Installation

You can install the package via composer:

Usage

A default menu will already be registered and bound to the Menu facade. You can add items to the menu like this:

The itemName should be unique within the menu since this is the identifier of the item in the Menu.

Route attribute and Active state

The route can be an absolute route like or a name of a route like for the automatic active state checking to work properly. If you want to use route names we recommend you to use Ziggy to convert the names to URLs in your front-end.

The active attribute is a boolean that will be true if the route matches the route of the current request (path or name wise).

Nested Routes

To create nested items you could use the following:

Attributes

You can pass attributes to the MenuItem to define values like Title or anything else you desire;

Adding items condition wise or via Auth Guards

If you would like to add menu items conditionwise, for example only add a menu item if a user is logged in, you can do it like this:

Or pass a Auth Guard:

Usage with InertiaJS

The main purpose of this package is to create Menu objects that can be adopted easily by the Front-End. One of the easiest ways to transfer the objects from the back to the front is by using InertiaJS.

Then for example in your inertia-vue layout template;

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

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


All versions of laravel-menu with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
illuminate/contracts Version ^6|^7|^8|^9|^10|^11
illuminate/database Version ^6|^7|^8|^9|^10|^11
illuminate/support Version ^6|^7|^8|^9|^10|^11
ext-json Version *
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 rspeekenbrink/laravel-menu contains the following files

Loading the files please wait ....