Disllow delete if parent

This commit is contained in:
snipe
2015-07-28 20:45:32 -07:00
parent 0c9018289b
commit 480fd78c51
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class Location extends Elegant
}
public function childLocations() {
return $this->hasMany('Location','id')->where('parent_id','=',$this->id);
return $this->hasMany('Location','parent_id');
}
public static function getLocationHierarchy($locations, $parent_id = null) {