Download the PHP package coreplex/crumbs without Composer

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

Crumbs Build Status Coverage Status

Framework agnostic breadcrumb container

Installation via composer

The package requires PHP 5.4+, includes a Laravel 5 Service Provider/Facade for quick integration, and abides the FIG standard PSR-4, allowing for a consistent codebase. All Coreplex packages follow these set standards. The repository is also fully unit tested through and continuously integrated through use of Travis CI.

To install Crumbs via composer, simply add it to your composer.json file

Then run composer update via the command line. To automatically add this into your composer json, you can simply run composer require coreplex/crumbs, and composer will handle this all for you

The Container

All breadcrumbs are held in a Container class. This allows you to prepare and render a set of breadcrumbs. A container has two dependencies. A Contracts\Crumb instance, and a Contracts\Renderer instance. We provide basic ones in the repository to be used

To add a few breadcrumbs to the container, you can either use the append method directly, like so

Or you can use a closure to group them into their own scope. To do this, just call the prepare method and use any of the container functions on the passed instance

To add a breadcrumb to the start of the container rather than the end, use the alternative prepend method

Rendering The Breadcrumbs

The basic renderer provided will return a simple list-based navigation string. This can be invoked through the main container class by just calling the render method.

The render method causes the last breadcrumb to be active by default. To disable this behaviour, pass false as the first parameter when calling render.

The container can also be rendered by simply echoing out the class, as it will be implicitly type-cast to a string.

Retrieving The Breadcrumbs and the Crumb Component

If you are going to be handling breadcrumbs from the container, you will want to access the numerous properties on the class. To do this, you can use the fluent attribute methods

There are also respective setters and isSetters for each of the attributes on the class

Laravel 5 Support

Crumbs has support for Laravel 5 out of the box. Once installed via composer, simply add the service provider to your app.php file

And also publish the config via command line, using the php artisan vendor:publish function. This allows the config to be published to the correct directory

Once these steps have been taken, Crumbs can be dependency injected into any controller constructs like so

Which will then allow access to the breadcrumbs container via the breadcrumbs class property on the controller

A facade is also provided to those who would opt using this over dependency injection. Simply add it to the aliases array in app.php

Which would then allow you to do things like this in your controllers

Planned Features


All versions of crumbs with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 coreplex/crumbs contains the following files

Loading the files please wait ....