Download the PHP package oddvalue/link-builder without Composer

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

Link Builder

A consistent interface for generating URLs and links for php models.

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

Installation

Via Composer

Usage

Creating a Generator

First off you will need a generator class for your model. This generator class will be responsible for deciding what the href and label of the link for your model should be.

This is the minimum generator setup:

You don't have to extend \Oddvalue\LinkBuilder\Contracts\LinkGenerator.

Preparing Your Model

Next, in your model, implement \Oddvalue\LinkBuilder\Contracts\Linkable. There is also a trait for ease of use but it is not essential to use it: \Oddvalue\LinkBuilder\Traits\LinkableTrait

For example:

Generating Links

Once you have set all your linkable models up with their respective link generators you will have a consistent interface for handling their URLs and links in your app.

e.g.

There is also a helper method for fetching the link generator of a model:

Link Attributes

In order to set classes and other attributes on the generated links you may either pass them in via the options array on the getLinkGenerator(array) method or you can call the setAttributes(array) method on the generator itself.


All versions of link-builder with dependencies

PHP Build Version
Package Version
Requires php Version ~7.3
illuminate/contracts Version >=6.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 oddvalue/link-builder contains the following files

Loading the files please wait ....