PHP Class Indatus\Ranger\ApiDatabase\QueryBuilding\ApiQueryBuilder

Afficher le fichier Open project: indatus/ranger

Méthodes publiques

Méthode Description
buildQueryFromParameters ( $builder, array $input ) : Model QueryString parameters for includes, joins, and left_joins can be provided in order to include additional data or join other tables. Both should be passed in as an array (i.e. includes[0], includes[1], joins[0], etc.).

Méthodes protégées

Méthode Description
checkBuilderType ( $builder ) checkBuilderType for now, this package will only work with eloquent

Method Details

buildQueryFromParameters() abstract public méthode

Includes are simply strings corresponding to the collection name. Joins should take the format: {join_table}:{table.some_field}={another_table.another_field} buildQueryFromParameters - based on the parameter type, the query builder object will be modified to append additional goodness such as joins, leftJoins, and eager loaded relationships. Then the builder will be returned so that queries can be executed on it.
abstract public buildQueryFromParameters ( $builder, array $input ) : Model
$input array
Résultat Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Builder

checkBuilderType() protected méthode

checkBuilderType for now, this package will only work with eloquent
protected checkBuilderType ( $builder )