Retrieve all records:
MyModel::all()
Retrieve a record by a primary key
MyModel::find($id)
Try to retrieve a record by a primary key, generating ModelNotFoundException
if there is no matching record
MyModel::fondOrFail($id)
Selecting specific columns:
MyModel::select($columns)
Counting records:
MyModel::count()
Ordering records
MyModel::orderBy($columns)->get()
Using conditional clauses
MyModel::where($column, $value)->get()
Limiting returned records
MyModel::take($num)->skip($offset)->get()
Pagination
MyModel::paginate($pageSize)
Displaying page navigation bar
{!! $list->render() !!}
Insert a new record
MyModel::create($properties)
Create a new record only if a record with the specified attributes doesn't exist
MyModel::firstOrCreate($attributes)
Create a new model instance only if a record with specified attributes doesn't exists
MyModel::firstOrNew($attributes)
#