From 08e2cff987fbe0372202779d74b0156123c9f082 Mon Sep 17 00:00:00 2001 From: August Janse Date: Fri, 1 Aug 2025 11:58:19 +0200 Subject: [PATCH] Fix colon not followed by code sample --- eloquent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eloquent.md b/eloquent.md index 1decebdb86..1f9020cd58 100644 --- a/eloquent.md +++ b/eloquent.md @@ -676,7 +676,7 @@ Route::get('/api/flights/{id}', function (string $id) { ### Retrieving or Creating Models -The `firstOrCreate` method will attempt to locate a database record using the given column / value pairs. If the model cannot be found in the database, a record will be inserted with the attributes resulting from merging the first array argument with the optional second array argument: +The `firstOrCreate` method will attempt to locate a database record using the given column / value pairs. If the model cannot be found in the database, a record will be inserted with the attributes resulting from merging the first array argument with the optional second array argument. The `firstOrNew` method, like `firstOrCreate`, will attempt to locate a record in the database matching the given attributes. However, if a model is not found, a new model instance will be returned. Note that the model returned by `firstOrNew` has not yet been persisted to the database. You will need to manually call the `save` method to persist it: