PHP 클래스 Indatus\Ranger\ApiDatabase\QueryBuilding\ApiQueryBuilder

파일 보기 프로젝트 열기: indatus/ranger

공개 메소드들

메소드 설명
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.).

보호된 메소드들

메소드 설명
checkBuilderType ( $builder ) checkBuilderType for now, this package will only work with eloquent

메소드 상세

buildQueryFromParameters() 추상적인 공개 메소드

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

checkBuilderType() 보호된 메소드

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