Download the PHP package atstudio-tech/breadcrumbs without Composer

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

Laravel Breadcrumbs

Latest Version on Packagist Total Downloads

A complete rework of an older Laravel's package that lets build breadcrumbs with quickly and easy.

Installation

You can install the package by running this command in your console:

The Service Provider will be automatically discovered so there is no need to add it manually to your /config/app.php file.

Vendor Files

You can publish both the configuration and views files with these commands:

Usage

There are two different places to populate a breadcrumbs list:

  1. In your routes file, e.g. web.php.
  2. Directly in your route's action, e.g. closure or controller.

Routes File

With this method you can get breadcrumbs declaration out of the way, however we don't have access to route parameters. That's a case where we can put breadcrumbs declaration in our controller.

This route macro has the same signature as the crumbs helper function.

Controller

This way you can use route parameters to build your breadcrumbs, such as showing a resource's ID.

Notations

There are are also three different ways of building a breadcrumbs list:

Breadcrumbs Class

or

Crumbs Façade

Helper Function

This is the one we have used so far

If no parameters are passed, the function will return an instance of the main Breadcrumbs class.

Rendering

You can render the breadcrumbs list by calling crumbs()->render() inside a Blade view or using a custom directive:

Both notations accept an optional parameter $view:

You can either customize already existing views that come with the package by running:

Or specify a custom view inside config('breadcrumbs.view').

View Customization

Let's say we want to create a completely new view for our breadcrumbs. We start by creating a new Blade file inside resources/views/vendor/breadcrumbs/custom-theme.blade.php (I prefer to put even custom views inside the vendor folder, but feel free to put them anywhere you like as long as it's inside resources/views folder).

Let's take a look the default view file (resources/views/vendor/breadcrumbs/plain.blade.php):

A few things to note here:

API

Breadcrumbs::add(string|array $title, ?string $path = null, mixed $params = null)

A breadcrumb requires a title.

If $path is not provided, current URL will be used instead. $path can either be relative URL that will be converted to an absolute link or a route name. In case of a route name, you can also use the third parameter $params.

$title accepts both a string and an array. If it's an array, it must contain these keys:

crumbs(string|array|callable|null $title = null, ?string $path = null, mixed $params = null)

If you call this helper function without any parameter, it will simply return an instance of Breadcrumbs as mentioned above. Otherwise it accepts the same parameters as Breadcrumbs::add().

Exclusively to this function, the $title parameter also accepts a closure (the same goes for the Route::crumbs() macro as shown in the example above):

Breadcrumb Item

A single breadcrumb item has title, path and active properties.

Changelog

The CHANGELOG file will tell you about all changes to this package.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of breadcrumbs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^8.0|^9.0|^10.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 atstudio-tech/breadcrumbs contains the following files

Loading the files please wait ....