Last Update : 2023-09-22 UTC 10:36:04 AM
Using the method updateOrCreate, is there a w3coded updateorcreate updated way to know which if a record was updated or w3coded updateorcreate updated created?, w3coded updateorcreate updated Stack Overflow for Teams w3coded updateorcreate updated Where developers & w3coded updateorcreate updated technologists share private knowledge with w3coded updateorcreate updated coworkers w3coded updateorcreate updated , w3coded updateorcreate updated Stack Overflow w3coded updateorcreate updated Public questions & answers w3coded updateorcreate updated ,Since w3coded updateorcreate updated updateOrCreate returns the model w3coded updateorcreate updated instance. https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Builder.php#L374
Since updateOrCreate
returns the model instance.
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Builder.php#L374
updateOrCreate
Since updateOrCreate
returns the model instance.
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Builder.php#L374
You can check that a record was recently created using:
$instance->wasRecentlyCreated
https://github.com/laravel/framework/blob/5.3/src/Illuminate/Database/Eloquent/Model.php#L1593
$instance->wasRecentlyCreated
Last Update : 2023-09-22 UTC 12:36:07 PM
Last Update : 2023-09-22 UTC 12:35:48 PM
Last Update : 2023-09-22 UTC 12:35:30 PM
Last Update : 2023-09-22 UTC 12:35:16 PM
Last Update : 2023-09-22 UTC 12:35:02 PM
Last Update : 2023-09-22 UTC 12:34:11 PM
Last Update : 2023-09-22 UTC 12:33:57 PM