Download the PHP package fragkp/laravel-route-breadcrumb without Composer

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

Add breadcrumbs to your routes

Latest Version Total Downloads

This package tries to give a simple solution for breadcrumbs. Add breadcrumbs direct to your routes and display them in your views.

Installation

You can install the package via composer:

If you want also use the facade to access the main breadcrumb class, add this line to your facades array in config/app.php:

This package contains some pre-built views for the most active css-frameworks:

If you want to use one of these views, include it in this way:

To customize the pre-built views, run this command:

Note: You could also create your own custom view to display breadcrumb links.

Usage

Defining breadcrumbs

Basic

To add a breadcrumb title to your route, call the breadcrumb method and pass your title.

Index

On some websites, you wish to have always an index inside your breadcrumbs. Use the breadcrumbIndex method. This method should only be used once.

Note: breadcrumbIndex sets also the breadcrumb title for this route.

Inside groups

The breadcrumb method will also work inside route groups.

Group index

Also, it is possible to specify a group index title by calling breadcrumbGroup. This method should only be used once inside a group.

Note: breadcrumbGroup sets also the breadcrumb title for this route.

Custom title resolver

If you want to customize your breadcrumb title, you could pass a closure to all breadcrumb methods.

You could also pass a fully qualified class name. This will invoke your class.

You may also pass a callable.

Route parameters

All route parameters will be passed to your resolver. Route model binding is also supported.

Accessing breadcrumb

Links

The links method will return a Collection of BreadcrumbLink.

Note: The array is indexed by the uri.

Example result:

Index

The index method will return a single instance of BreadcrumbLink. If you haven't defined any index, null is returned.

Example result:

Current

The current method will return a single instance of BreadcrumbLink. If no route is provided (e.g. on errors), null is returned.

Example result:

View example

A good way to access the breadcrumb inside your views is to bound it via a View Composer.

For more information about View Composers, have a look at the Laravel docs.

Testing

License

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


All versions of laravel-route-breadcrumb with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
laravel/framework Version ^8.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 fragkp/laravel-route-breadcrumb contains the following files

Loading the files please wait ....