PHP 클래스 REBELinBLUE\Deployer\Repositories\EloquentRepository

파일 보기 프로젝트 열기: rebelinblue/deployer 1 사용 예제들

보호된 프로퍼티들

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

공개 메소드들

메소드 설명
create ( array $fields ) : Model Creates a new instance of the model.
deleteById ( integer $model_id ) : boolean Delete an instance by it's ID.
getAll ( ) : Illuminate\Database\Eloquent\Collection Get's all records from the model.
getById ( integer $model_id ) : Model Get's an item from the repository.
updateById ( array $fields, integer $model_id ) : Model Updates an instance by it's ID.

메소드 상세

create() 공개 메소드

Creates a new instance of the model.
public create ( array $fields ) : Model
$fields array
리턴 Illuminate\Database\Eloquent\Model

deleteById() 공개 메소드

Delete an instance by it's ID.
public deleteById ( integer $model_id ) : boolean
$model_id integer
리턴 boolean

getAll() 공개 메소드

Get's all records from the model.
public getAll ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

getById() 공개 메소드

Get's an item from the repository.
public getById ( integer $model_id ) : Model
$model_id integer
리턴 Illuminate\Database\Eloquent\Model

updateById() 공개 메소드

Updates an instance by it's ID.
public updateById ( array $fields, integer $model_id ) : Model
$fields array
$model_id integer
리턴 Illuminate\Database\Eloquent\Model

프로퍼티 상세

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

An instance of the model.
protected Model,Illuminate\Database\Eloquent $model
리턴 Illuminate\Database\Eloquent\Model