Download the PHP package saeedhosan/laravel-menus without Composer

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

Laravel Menus

Simple, flexible menu builder for Laravel.

Requirements

Installation

The service provider is auto-discovered. To publish the config and views:

Creating a Menu

Create a class that extends MenuBuilder and define your items:

Item Properties

Key Type Description
name string Display label
slug string Unique identifier used for positioning
link string URL (optional)
icon string Icon HTML (defaults to a bullet dot)
active bool Marks item as active
access string\|array Permission(s) checked via access callback
badge string\|array Badge text, or ['text', 'css-class']
separator bool Renders as a section heading
submenu array Nested menu items

Registering Menus

Register your menus in a service provider:

Positioning Child Items

Control where child items are placed using the fluent filter API:

Updating a Menu's Parent

Move an existing menu registration to a different parent:

Rendering

As Array

As HTML

The package ships with Blade views compatible with Metronic/Bootstrap sidebar menus:

You can customize the views after publishing them:

Views are published to resources/views/vendor/laravel-menus.

Access Control

Items with an access key are filtered through a configurable callback. The default uses Laravel's Gate:

Define permissions on your items:

To use a custom callback, create an invokable class:

Renderable Condition

Control whether a menu renders at all by overriding renderable():

Badges

MenuBuilder provides badge helpers you can use in your items:

Testing

License

MIT


All versions of laravel-menus with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
laravel/framework Version ^11.0|^12.0|^13.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 saeedhosan/laravel-menus contains the following files

Loading the files please wait ...