PHP Class Indatus\Ranger\ApiDatabase\QueryBuilding\ApiQueryBuilder

Datei anzeigen Open project: indatus/ranger

Public Methods

Method 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.).

Protected Methods

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

Method Details

buildQueryFromParameters() abstract public method

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
return Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Builder

checkBuilderType() protected method

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