I want to update my data but I dont want to update my timestamps. Laravel 4.x provide us the facility to update our data without updating our timestamps.
The example to Update without touching timestamps using Laravel 4.x is:
$user = User::find(1);
$user->timestamps = false;
$user->age = 72;
$user->save();
Here User is a model and save is a method which will use to update the data. By using
$user->timestamps = false;
By using this we will temporarily disable the timestamps update.
0 Comment(s)