Property | Type | Description | |
---|---|---|---|
$model | The model instance. |
Method | Description | |
---|---|---|
__call ( string $method, array $arguments ) : mixed | Implement a convenience call to findBy which allows finding by an attribute name as follows: findByName or findByAlias. | |
__construct ( $model ) | ||
all ( ) : Illuminate\Database\Eloquent\Collection | Returns all the records. | |
count ( ) : integer | Returns the count of all the records. | |
fill ( array $attributes ) : |
Fills out an instance of the model with $attributes. | |
fillAndSave ( array $attributes ) : |
Fills out an instance of the model and saves it, pretty much like mass assignment. | |
find ( string $id, array $relations = null ) : |
Find a record by its identifier. | |
findBy ( string $attribute, string $value, array $relations = null ) : |
Find a record by an attribute. | |
first ( ) : |
Returns the first record in the database. | |
getByAttributes ( array $attributes, string $operator = 'AND', array $relations = null ) : |
Get all records by an associative array of attributes. | |
page ( $limit = 10, integer $offset, array $relations = [], $orderBy = 'updated_at', $sorting = 'desc' ) : Illuminate\Database\Eloquent\Collection | Returns a range of records bounded by pagination parameters. | |
remove ( string $key ) : boolean | Remove a selected record. |
public all ( ) : Illuminate\Database\Eloquent\Collection | ||
return | Illuminate\Database\Eloquent\Collection |
public fillAndSave ( array $attributes ) : |
||
$attributes | array | |
return |
public first ( ) : |
||
return |