Download the PHP
package zerochip/laravel-lineage without Composer
On this page you can find all versions of the php package
zerochip/laravel-lineage. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
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.
A package for chain calling Laravel relationships. Some relationships return collections so can't be chained. This package provides a way to get past that.
Installation
Install with composer
composer require zerochip/laravel-lineage
Add the ServiceProvider to your providers array in config/app.php
Quickstart
Add the lineage trait to your model
For example to get a quizzes for a subject.
Without lineage we would have had to do this:
Using Laravel-Lineage we just do the following
You can also get the lineage for a collection.
We can even get the inverse of that
NB: lineage always returns a collection hence the use of first in the above
Lineage format
Lineage format rules are as follows:
1) Uses the delimiter ->.
2) Should be a string
3) Should have at least 2 levels
4) If preferred can start with ->
5) Can not be open ended
Usage without trait and collection macro
The lineage class can be used directly. This class has one static method get() which takes the object (model or collection) as the first parameter and the lineage as the second
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 zerochip/laravel-lineage contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.