Download the PHP
package biiiiiigmonster/hasin without Composer
On this page you can find all versions of the php package
biiiiiigmonster/hasin. 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.
The hasin is composer package based on where in syntax to query the relationship of laravel ORM, which can replace has based on where exists syntax in some business scenarios to obtain higher performance.
Installation
Laravel Version
Install command
Laravel 12
Laravel 11
Laravel 10
Laravel 9
Laravel 5.5 ~ 8
Introductions
The relationship of laravel ORM is very powerful, and the query has based on the relationship also provides us with many flexible calling methods. However, in some cases, has is implemented with where exists syntax.
For example:
select * from users where exists (select * from posts where users.id = posts.user_id)
'exists' is a loop to the external table, and then queries the internal table (subQuery) every time. Because the index used for the query of the internal table (the internal table is efficient, so it can be used as a large table), and how much of the external table needs to be traversed, it is inevitable (try to use a small table), so the use of exists for the large internal table can speed up the efficiency.
When the User table has a large amount of data, there will be performance problems, so the where in syntax will greatly improve the performance.
select * from users where users.id in (select posts.user_id from posts)
'in' is to hash connect the appearance and inner table, first query the inner table, then match the result of the inner table with the appearance, and use the index for the outer table (the appearance is efficient, and large tables can be used). Most of the inner tables need to be queried, which is inevitable. Therefore, using 'in' with large appearance can speed up the efficiency.
Therefore, the use of has(hasMorph) or hasIn(hasMorphIn) in code should be determined by data size
Usage example
hasIn(hasMorphIn) supports all Relations in laravel ORM. The call mode and internal implementation are completely consistent with has(hasMorph) of the framework.
hasIn
whereHasIn
hasMorphIn
Nested Relation
Testing
Tips: before testing, you need to configure your database connection in the phpunit.xml.dist.
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 biiiiiigmonster/hasin 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.