Download the PHP package robertboes/inertia-breadcrumbs without Composer

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

Laravel package to automatically share breadcrumbs to Inertia

Latest Version on Packagist Packagist PHP Version Support GitHub Tests Action Status GitHub Code Style Action Status GitHub tag (latest SemVer) Total Downloads GitHub

This package automatically shares breadcrumbs as Inertia props in a standardized way, with support for multiple breadcrumb packages.

Installation

You can install the package via composer:

You can publish the config file with:

Next step is to install one of the following packages to manage your breadcrumbs:

Configure your breadcrumbs as explained by the package

Update your config/inertia-breadcrumbs.php configuration to use the correct collector:

Usage

No matter which third party package you're using, this package will always share breadcrumbs to Inertia in the following format:

An example to render your breadcrumbs in Vue 3 could look like the following:

Using a classifier

A classifier is used to determine when breadcrumbs should be shared as Inertia props. By default all breadcrumbs are shared, but this package is shipped with the IgnoreSingleBreadcrumbs classifier, which simply discards a breadcrumb collection containing only one route.

To write your own classifier you'll have to implement RobertBoes\InertiaBreadcrumbs\BreadcrumbCollection\ClassifierContract and update the inertia-breadcrumbs.classifier config, for example:

Serializing breadcrumbs

In some cases you might not like the default way breadcrumbs are serialized. To modify the way the breadcrumbs are being sent to the frontend you can register a serialize callback in the boot method of a service provider:

Including the query string when determining the current URL

By default, the query string will be ignored when determining the current url, meaning a breadcrumb defined for /users/{id} will match both /users/1 and /users/1?foo=bar. To change this behaviour and include the query string (meaning /users/1?foo=bar will not be seen as the current page), change ignore_query to false in the config/inertia-breadcrumbs.php file.

Notes on using glhd/gretel

glhd/gretel shares the breadcrumbs automatically if it detects Inertia is installed and shares the props with the same key (breadcrumbs). If you want to use this package with gretel you should disable their automatic sharing by updating the config:

Testing

Upgrading

For notable changes see UPGRADING.

Changelog

Please see CHANGELOG for more information on what has changed recently.

TODO

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of inertia-breadcrumbs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0
inertiajs/inertia-laravel Version ^0.6.2
spatie/laravel-package-tools Version ^1.11.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 robertboes/inertia-breadcrumbs contains the following files

Loading the files please wait ....