Download the PHP package graham-campbell/navigation without Composer

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

Laravel Navigation

Laravel Navigation was created by, and is maintained by Graham Campbell, and is a navigation bar generator for Laravel 5. Feel free to check out the releases, contribution guidelines.

Laravel Navigation

Build Status Coverage Status Quality Score Latest Version

Installation

PHP 5.5+ or HHVM 3.6+, and Composer are required.

To get the latest version of Laravel Navigation, simply add the following line to the require block of your composer.json file:

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Once Laravel Navigation is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key.

You can register the Navigation facade in the aliases key of your config/app.php file if you like.

Configuration

Laravel Navigation requires no configuration. Just follow the simple install instructions and go!

Usage

Navigation

This is the class of most interest. It is bound to the ioc container as 'navigation' and can be accessed using the Facades\Navigation facade. There are three public methods of interest.

The 'addToMain' and 'addToBar' methods will add the item to the internal main navigation array in the specified way. These methods both accept three arguments. All but the first are optional. The first argument must be an array. It must have either a 'slug' key or a 'url' key where the slug is the target url relative to the base url, and the url is a full url you may specify (useful to link to somewhere outside the application). It must also have a 'title' key which will specify the title, and you may also optionally add an 'icon' key which will at the relevant icon from font awesome to the mix. The second parameter specifies which navigation bar you want to add to. By default this is 'default', but you may have mutliple navigation bars, for example, Bootstrap CMS has an 'admin' navigation bar. The final parameter specifies if the item should be prepended to the internal array. By default this is false.

The third method is 'render', and accepts three arguments. All arguments are optional. The fist argument selects the main navigation bar you which to return. By default this is set to 'default'. The third argument selection the bar navigation bar you wish to return. By default this is set to false, where by no bar navigation is returned. You may set this to any string to return the relevant navigation bar. The final parameter is an array of variables you wish to pass to the navigation view. The default is ['title' => 'Navigation', 'side' => 'dropdown', 'inverse' => true].

Note that the navigation bar referred to as 'main' is the navigation bar that will go across the top of your page, and the navigation bar referred to as 'bar' is the navigation bar that will be a dropdown at the side. These are also referred to in the context of the default view provided with this package (for Twitter Bootstrap 3).

Also note that the render method will emit events so you can call the addTo methods lazily. The events emitted are 'navigation.main' and 'navigation.bar', which are emitted just before the render method starts to deal with the each navigation bar. The name of the selected navigation bar is also emitted. Check out the source.

Facades\Navigation

This facade will dynamically pass static method calls to the 'navigation' object in the ioc container which by default is the Navigation class.

NavigationServiceProvider

This class contains no public methods of interest. This class should be added to the providers array in config/app.php. This class will setup ioc bindings.

License

Laravel Navigation is licensed under The MIT License (MIT).


All versions of navigation with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/contracts Version 5.0.*|5.1.*
illuminate/http Version 5.0.*|5.1.*
illuminate/support Version 5.0.*|5.1.*
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 graham-campbell/navigation contains the following files

Loading the files please wait ....