@@ -183,21 +183,21 @@ feature may be handy when we want to implement 1:1 relation or use UUIDs for our
183183
184184The Model's CRUD methods will take a step of work away from you and automatically return
185185the resulting data, instead of the Result object. This setting allows you to define
186- the type of data that is returned. Valid values are 'array' , 'object', or the fully
187- qualified name of a class that can be used with the Result object's getCustomResultObject()
186+ the type of data that is returned. Valid values are '** array **' (the default) , '** object ** ', or the ** fully
187+ qualified name of a class ** that can be used with the Result object's `` getCustomResultObject() ``
188188method.
189189
190190**$useSoftDeletes **
191191
192192If true, then any ``delete() `` method calls will set ``deleted_at `` in the database, instead of
193193actually deleting the row. This can preserve data when it might be referenced elsewhere, or
194194can maintain a "recycle bin" of objects that can be restored, or even simply preserve it as
195- part of a security trail. If true, the find* methods will only return non-deleted rows, unless
196- the withDeleted() method is called prior to calling the find* method.
195+ part of a security trail. If true, the ** find*() * * methods will only return non-deleted rows, unless
196+ the `` withDeleted() `` method is called prior to calling the ** find*() * * method.
197197
198198This requires either a DATETIME or INTEGER field in the database as per the model's
199- $dateFormat setting. The default field name is ``deleted_at `` however this name can be
200- configured to any name of your choice by using $deletedField property.
199+ `` $dateFormat `` setting. The default field name is ``deleted_at `` however this name can be
200+ configured to any name of your choice by using `` $deletedField `` property.
201201
202202**$allowedFields **
203203
@@ -209,8 +209,8 @@ potential mass assignment vulnerabilities.
209209**$useTimestamps **
210210
211211This boolean value determines whether the current date is automatically added to all inserts
212- and updates. If true, will set the current time in the format specified by $dateFormat. This
213- requires that the table have columns named ' created_at' and ' updated_at' in the appropriate
212+ and updates. If true, will set the current time in the format specified by `` $dateFormat `` . This
213+ requires that the table have columns named ** created_at ** and ** updated_at ** in the appropriate
214214data type.
215215
216216**$createdField **
@@ -227,8 +227,8 @@ Leave it empty to avoid update it (even ``$useTimestamps`` is enabled).
227227
228228This value works with ``$useTimestamps `` and ``$useSoftDeletes `` to ensure that the correct type of
229229date value gets inserted into the database. By default, this creates DATETIME values, but
230- valid options are: datetime, date, or int (a PHP timestamp). Using ' useSoftDeletes' or
231- ' useTimestamps' with an invalid or missing dateFormat will cause an exception.
230+ valid options are: `` ' datetime' ``, `` ' date' `` , or `` ' int' `` (a PHP timestamp). Using ** useSoftDeletes ** or
231+ ** useTimestamps ** with an invalid or missing dateFormat will cause an exception.
232232
233233**$validationRules **
234234
@@ -243,7 +243,7 @@ described in :ref:`validation-custom-errors`. Described in more detail below.
243243
244244**$skipValidation **
245245
246- Whether validation should be skipped during all `` inserts `` and `` updates `` . The default
246+ Whether validation should be skipped during all ** inserts ** and ** updates ** . The default
247247value is false, meaning that data will always attempt to be validated. This is
248248primarily used by the ``skipValidation() `` method, but may be changed to ``true `` so
249249this model will never validate.
@@ -321,8 +321,8 @@ Returns the first row in the result set. This is best used in combination with t
321321
322322**withDeleted() **
323323
324- If $useSoftDeletes is true, then the find* methods will not return any rows where 'deleted_at IS NOT null '.
325- To temporarily override this, you can use the withDeleted() method prior to calling the find* method.
324+ If `` $useSoftDeletes `` is true, then the ** find*() ** methods will not return any rows where 'deleted_at IS NOT NULL '.
325+ To temporarily override this, you can use the `` withDeleted() `` method prior to calling the ** find*() * * method.
326326::
327327
328328 // Only gets non-deleted rows (deleted = 0)
@@ -333,8 +333,8 @@ To temporarily override this, you can use the withDeleted() method prior to call
333333
334334**onlyDeleted() **
335335
336- Whereas withDeleted() will return both deleted and not-deleted rows, this method modifies
337- the next find* methods to return only soft deleted rows::
336+ Whereas `` withDeleted() `` will return both deleted and not-deleted rows, this method modifies
337+ the next ** find*() * * methods to return only soft deleted rows::
338338
339339 $deletedUsers = $userModel->onlyDeleted()->findAll();
340340
@@ -356,9 +356,9 @@ the array's values are the values to save for that key::
356356
357357**update() **
358358
359- Updates an existing record in the database. The first parameter is the $primaryKey of the record to update.
359+ Updates an existing record in the database. The first parameter is the `` $primaryKey `` of the record to update.
360360An associative array of data is passed into this method as the second parameter. The array's keys must match the name
361- of the columns in a $table, while the array's values are the values to save for that key::
361+ of the columns in a `` $table `` , while the array's values are the values to save for that key::
362362
363363 $data = [
364364 'username' => 'darth',
@@ -385,8 +385,8 @@ update command, with the added benefit of validation, events, etc::
385385
386386**save() **
387387
388- This is a wrapper around the insert() and update() methods that handle inserting or updating the record
389- automatically, based on whether it finds an array key matching the $primaryKey value::
388+ This is a wrapper around the `` insert() `` and `` update() `` methods that handle inserting or updating the record
389+ automatically, based on whether it finds an array key matching the ** primary key ** value::
390390
391391 // Defined as a model property
392392 $primaryKey = 'id';
@@ -628,7 +628,7 @@ method directly, with options::
628628 $rules = $model->getValidationRules($options);
629629
630630The ``$options `` parameter is an associative array with one element,
631- whose key is either " except" or " only" , and which has as its
631+ whose key is either `` ' except' `` or `` ' only' `` , and which has as its
632632value an array of fieldnames of interest.::
633633
634634 // get the rules for all but the "username" field
@@ -712,8 +712,8 @@ very elegant use::
712712Runtime Return Type Changes
713713----------------------------
714714
715- You can specify the format that data should be returned as when using the find*() methods as the class property,
716- $returnType. There may be times that you would like the data back in a different format, though. The Model
715+ You can specify the format that data should be returned as when using the ** find*() ** methods as the class property,
716+ `` $returnType `` . There may be times that you would like the data back in a different format, though. The Model
717717provides methods that allow you to do just that.
718718
719719.. note :: These methods only change the return type for the next **find*()** method call. After that,
0 commit comments