PHP 클래스 App\Data\Repositories\Repository

파일 보기 프로젝트 열기: Vinelab/lucid

보호된 프로퍼티들

프로퍼티 타입 설명
$model Illuminate\Database\Eloquent\Model The model instance.

공개 메소드들

메소드 설명
__call ( string $method, array $arguments ) : mixed Implement a convenience call to findBy which allows finding by an attribute name as follows: findByName or findByAlias.
__construct ( $model )
all ( ) : Illuminate\Database\Eloquent\Collection Returns all the records.
count ( ) : integer Returns the count of all the records.
fill ( array $attributes ) : Model Fills out an instance of the model with $attributes.
fillAndSave ( array $attributes ) : Model Fills out an instance of the model and saves it, pretty much like mass assignment.
find ( string $id, array $relations = null ) : Model Find a record by its identifier.
findBy ( string $attribute, string $value, array $relations = null ) : Model Find a record by an attribute.
first ( ) : Model Returns the first record in the database.
getByAttributes ( array $attributes, string $operator = 'AND', array $relations = null ) : Collection Get all records by an associative array of attributes.
page ( $limit = 10, integer $offset, array $relations = [], $orderBy = 'updated_at', $sorting = 'desc' ) : Illuminate\Database\Eloquent\Collection Returns a range of records bounded by pagination parameters.
remove ( string $key ) : boolean Remove a selected record.

메소드 상세

__call() 공개 메소드

Implement a convenience call to findBy which allows finding by an attribute name as follows: findByName or findByAlias.
public __call ( string $method, array $arguments ) : mixed
$method string
$arguments array
리턴 mixed

__construct() 공개 메소드

public __construct ( $model )

all() 공개 메소드

Returns all the records.
public all ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

count() 공개 메소드

Returns the count of all the records.
public count ( ) : integer
리턴 integer

fill() 공개 메소드

Fills out an instance of the model with $attributes.
public fill ( array $attributes ) : Model
$attributes array
리턴 Illuminate\Database\Eloquent\Model

fillAndSave() 공개 메소드

Fills out an instance of the model and saves it, pretty much like mass assignment.
public fillAndSave ( array $attributes ) : Model
$attributes array
리턴 Illuminate\Database\Eloquent\Model

find() 공개 메소드

Find a record by its identifier.
public find ( string $id, array $relations = null ) : Model
$id string
$relations array
리턴 Illuminate\Database\Eloquent\Model

findBy() 공개 메소드

Fails if no model is found.
public findBy ( string $attribute, string $value, array $relations = null ) : Model
$attribute string
$value string
$relations array
리턴 Illuminate\Database\Eloquent\Model

first() 공개 메소드

Returns the first record in the database.
public first ( ) : Model
리턴 Illuminate\Database\Eloquent\Model

getByAttributes() 공개 메소드

Two operators values are handled: AND | OR.
public getByAttributes ( array $attributes, string $operator = 'AND', array $relations = null ) : Collection
$attributes array
$operator string
$relations array
리턴 Illuminate\Support\Collection

page() 공개 메소드

Returns a range of records bounded by pagination parameters.
public page ( $limit = 10, integer $offset, array $relations = [], $orderBy = 'updated_at', $sorting = 'desc' ) : Illuminate\Database\Eloquent\Collection
$offset integer
$relations array
리턴 Illuminate\Database\Eloquent\Collection

remove() 공개 메소드

Remove a selected record.
public remove ( string $key ) : boolean
$key string
리턴 boolean

프로퍼티 상세

$model 보호되어 있는 프로퍼티

The model instance.
protected Model,Illuminate\Database\Eloquent $model
리턴 Illuminate\Database\Eloquent\Model