interface EloquentRepositoryInterface

Methods

all()

Return all records.

find($id)

Find a record by it's ID.

findAll( array $ids)

Find all records by IDs.

findTrashed($id)

Find a trashed record by it's ID.

create( array $attributes)

Create a new record.

Builder
newQuery()

Return a new query builder.

newInstance()

Return a new instance.

int
count()

Count all records.

LengthAwarePaginator
paginate( array $parameters = array())

Return a paginated collection.

bool
save( EloquentModel $entry)

Save a record.

bool
update( array $attributes = array())

Update multiple records.

bool
delete( EloquentModel $entry)

Delete a record.

bool
forceDelete( EloquentModel $entry)

Force delete a record.

bool
restore( EloquentModel $entry)

Restore a trashed record.

$this
truncate()

Truncate the entries.

$this
setModel( EloquentModel $model)

Set the repository model.

getModel()

Get the model.

Details

at line 17
EloquentCollection all()

Return all records.

Return Value

EloquentCollection

at line 26
null|EloquentModel find($id)

Find a record by it's ID.

Parameters

$id

Return Value

null|EloquentModel

at line 35
EloquentCollection findAll( array $ids)

Find all records by IDs.

Parameters

array $ids

Return Value

EloquentCollection

at line 44
null|EloquentModel findTrashed($id)

Find a trashed record by it's ID.

Parameters

$id

Return Value

null|EloquentModel

at line 53
EloquentModel create( array $attributes)

Create a new record.

Parameters

array $attributes

Return Value

EloquentModel

at line 60
Builder newQuery()

Return a new query builder.

Return Value

Builder

at line 67
EloquentModel newInstance()

Return a new instance.

Return Value

EloquentModel

at line 74
int count()

Count all records.

Return Value

int

at line 83
LengthAwarePaginator paginate( array $parameters = array())

Return a paginated collection.

Parameters

array $parameters

Return Value

LengthAwarePaginator

at line 92
bool save( EloquentModel $entry)

Save a record.

Parameters

EloquentModel $entry

Return Value

bool

at line 101
bool update( array $attributes = array())

Update multiple records.

Parameters

array $attributes

Return Value

bool

at line 110
bool delete( EloquentModel $entry)

Delete a record.

Parameters

EloquentModel $entry

Return Value

bool

at line 119
bool forceDelete( EloquentModel $entry)

Force delete a record.

Parameters

EloquentModel $entry

Return Value

bool

at line 128
bool restore( EloquentModel $entry)

Restore a trashed record.

Parameters

EloquentModel $entry

Return Value

bool

at line 135
$this truncate()

Truncate the entries.

Return Value

$this

at line 144
$this setModel( EloquentModel $model)

Set the repository model.

Parameters

EloquentModel $model

Return Value

$this

at line 151
EloquentModel getModel()

Get the model.

Return Value

EloquentModel