Download the PHP package fashionphile/qeto without Composer

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

Qeto Query Package

built by Fashionphile

Purpose

Single manageable location for creating query where scopes. Originally they were being put into each table model as Laravel scopes for Eloquent queries. We then had to build out specific queries for other locations cause the scopes were just Laravel specific. These queries are a location where you can create the query using raw sql along with parameters to build out sql queries using any ORM or raw sql.

Basic Use

First you will want to add the Qeto\QueryTrait on any of your table models that you want to query on. This will connect the query to the correct folder structure. Let's say we are using App\User and have included the trait. Then add the protected variable $name to be the name of the class.

That file then connects to a created file (in our case we already have it created)App\Queries\UserQueries.php. First you will have to extend in your App\User file the Qeto\BaseQuery class. Once that has been added you can start to add any query scope you want. Let's add the query byUsername that queries the users by the username field.

This function allows us to search the users model byUsername. We can pass in the sku that we want to use and it will query the model. We have set up binding for security.

To call this function we would then invoke the facade and we would use the qWhereRaw to get the raw sql along with any function that you need to call as the first parameter and the second parameter is the parameter for the query.

Inverses

We have added inverses that can be used to do the opposite of what you are calling. We originally had two seperate function byUsername and byNotUsername (retrieve the users that don't have that sku). The inverse now let's you establish that in the same call.

Now calling the qIWhereRaw function it will get the inverse of the byUsername.

Use as eloquent scopes

To use as an eloquent scope you just call the function just as you would a scope, but you won't call the raw version

This allows you to append other scopes and use other eloquent methods with it.

Making sub folders

Adding all queries to one file would make for a very bloated class. So you can add child classes off the main one within a file that is namespaced after the parent. For example, let's say we want to move the user types to their own file they are a child of the user class. So you would make a App\Queries\User folder and create a new file userTypeQueries.php with a same named class and extending the UserQueries class. So now let's say we move the byUsername function over to the UserTypeQueries class. To call that class you put the name of the file as the first part of the camel cased function you declare in the qWhere.

Joining queries and make Or Where statements.

If you find yourself making a group of queries together often you can join them into one scope using the joinByAnd function. This will join the queries into one that you can then use. Let's say we keep on looking for queries where they have a specific user type and signed up to become a member on a certain date. We can create two queries byType and byCreatedDay and join them together in one that we can always call together.

The syntax in the joinByAnd is that you pass in the name of methods you want to call. It then takes the parameters that you pass in the form of an array for each parameter that is needed.

You would then call getTypesBetweenDate:

This would pass each parameter to the specific functions and return them.

Relation Methods

To call a relation method you just pass the relation name as the first parameter on the query qRelationWhere as an eloquent scope.

This would query the OrderQueries model you will have had to have created by the function byCity.

Contact me:

Author Dano Gillette

https://twitter.com/danodev

http://danogillette.com


All versions of qeto with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 fashionphile/qeto contains the following files

Loading the files please wait ....