public function destroySource($id) { $source = Source::findOrFail($id); //if source has maps return -1 $result = Source::destroy($id); return $result; }