PHP Class App\Repositories\AbstractEloquentRepository

Inheritance: implements App\Repositories\RepositoryInterface
Afficher le fichier Open project: ngmy/webloyer

Protected Properties

Свойство Type Description
$model

Méthodes publiques

Méthode Description
all ( ) : Illuminate\Database\Eloquent\Collection Get all models.
byId ( integer $id ) : Model Get a model by id.
byPage ( integer $page = 1, integer $limit = 10 ) : Illuminate\Pagination\LengthAwarePaginator Get paginated models.
create ( array $data ) : Model Create a new model.
delete ( integer $id ) : boolean Delete an existing model.
update ( array $data ) : boolean Update an existing model.

Method Details

all() public méthode

Get all models.
public all ( ) : Illuminate\Database\Eloquent\Collection
Résultat Illuminate\Database\Eloquent\Collection

byId() public méthode

Get a model by id.
public byId ( integer $id ) : Model
$id integer Model id
Résultat Illuminate\Database\Eloquent\Model

byPage() public méthode

Get paginated models.
public byPage ( integer $page = 1, integer $limit = 10 ) : Illuminate\Pagination\LengthAwarePaginator
$page integer Page number
$limit integer Number of models per page
Résultat Illuminate\Pagination\LengthAwarePaginator

create() public méthode

Create a new model.
public create ( array $data ) : Model
$data array Data to create a model
Résultat Illuminate\Database\Eloquent\Model

delete() public méthode

Delete an existing model.
public delete ( integer $id ) : boolean
$id integer Model id
Résultat boolean

update() public méthode

Update an existing model.
public update ( array $data ) : boolean
$data array Data to update a model
Résultat boolean

Property Details

$model protected_oe property

protected $model