In this article, we will see How to update record without saving or updating timestamp fields either `updated_at` or any other custom field. Laravel provides us functionality to handle timestamp update while saving model. Assigning `false` to `timestamps` property of model during model save, prevents auto update of timestamp fields.
This tutorial explains with syntax and an example of how to create a collection instance from provided array with Laravel collect() helper method in the framework.
In this article, we will see Laravel's `firstOrCreate()` model method and how it provides you first instance from table if exists or create new table records if does not exists. You don't need to explicitly save like `firstOrNew()`.
In this article, we will see Laravel's `firstOrNew()` model method and how it is useful. It provides you first instance from table if exists or create new model instance. You need to explicitly save model instance.
This tutorial explains with syntax and an example of how to flatten a multi-dimensional array based on the value of depth specified in the Laravel framework.