PHP Класс REBELinBLUE\Deployer\Repositories\EloquentRepository

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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