PHP 클래스 Learner\Repositories\Eloquent\AbstractRepository

파일 보기 프로젝트 열기: RryLee/learner.video

보호된 프로퍼티들

프로퍼티 타입 설명
$model Illuminate\Database\Eloquent\Model The model to execute queries on.

공개 메소드들

메소드 설명
__construct ( Model $model ) Create a new repository instance.
deleteById ( $id ) : boolean | null Delete the instance from the database.
findById ( integer $id ) : Model | Illuminate\Database\Eloquent\Collection Find instance by gived id.
findByIdWithRelation ( integer $id, string | array $relations ) : Model | Illuminate\Database\Eloquent\Collection Find instance with relation by id.
getNew ( array $attributes = [] ) : Model Get a new instance of the model.

메소드 상세

__construct() 공개 메소드

Create a new repository instance.
public __construct ( Model $model )
$model Illuminate\Database\Eloquent\Model The model to execute queries on

deleteById() 공개 메소드

Delete the instance from the database.
public deleteById ( $id ) : boolean | null
리턴 boolean | null

findById() 공개 메소드

Find instance by gived id.
public findById ( integer $id ) : Model | Illuminate\Database\Eloquent\Collection
$id integer
리턴 Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection

findByIdWithRelation() 공개 메소드

Find instance with relation by id.
public findByIdWithRelation ( integer $id, string | array $relations ) : Model | Illuminate\Database\Eloquent\Collection
$id integer
$relations string | array
리턴 Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection

getNew() 공개 메소드

Get a new instance of the model.
public getNew ( array $attributes = [] ) : Model
$attributes array
리턴 Illuminate\Database\Eloquent\Model

프로퍼티 상세

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

The model to execute queries on.
protected Model,Illuminate\Database\Eloquent $model
리턴 Illuminate\Database\Eloquent\Model