Property | Type | Description | |
---|---|---|---|
$model | An instance of the model. |
Method | Description | |
---|---|---|
create ( array $fields ) : |
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 ) : |
Get's an item from the repository. | |
updateById ( array $fields, integer $model_id ) : |
Updates an instance by it's ID. |
public deleteById ( integer $model_id ) : boolean | ||
$model_id | integer | |
return | boolean |
public getAll ( ) : Illuminate\Database\Eloquent\Collection | ||
return | Illuminate\Database\Eloquent\Collection |
public updateById ( array $fields, integer $model_id ) : |
||
$fields | array | |
$model_id | integer | |
return |