Wednesday, April 23, 2014

[Laravel] Disable update Laravel's Eloquent timestamps of a table

If you want disable updating update_by(timestamps) column while updating the database via Eloquent. Add this line in your model:
public $timestamps = false;



Remark;
The access modifier must be public , otherwise would cause error:
Access level to YourControllerName::$timestamps must be public (as in class Illuminate\Database\Eloquent\Model)

Reference:
http://stackoverflow.com/questions/19937565/disable-laravels-eloquent-timestamps

No comments :

Post a Comment