Skip to content

Instantly share code, notes, and snippets.

@sniper7kills
Created May 26, 2015 01:57
Show Gist options
  • Save sniper7kills/15730618d833748409a5 to your computer and use it in GitHub Desktop.
Save sniper7kills/15730618d833748409a5 to your computer and use it in GitHub Desktop.
Code for arvind132
private $historyLimit=500;
public function postSave()
{
if (isset($this->historyLimit) && $this->revisionHistory()->count() >= $this->historyLimit){
$LimitReached=true;
}else{
parent::postSave();
}
}
@sniper7kills
Copy link
Author

@arvind132 You should be able to use this code in your model to get the revision functionality you are looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment