Skip to content

Instantly share code, notes, and snippets.

@frankdejonge
Created October 23, 2012 11:07
Show Gist options
  • Save frankdejonge/3938210 to your computer and use it in GitHub Desktop.
Save frankdejonge/3938210 to your computer and use it in GitHub Desktop.
Tester
protected static function delete_translations($obj)
{
$translation = static::find(function($query) use($obj){
$query->where('parent_id', $obj->id);
});
foreach($translation as $row)
{
$row->delete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment