private function delete($obj) { $sync = Config::get('database.connections.firebase.sync'); // `sync` by Default (config)? $path = strtolower(get_class($obj)) . 's'; // plural collection name $id = \Firebase::getId($obj); // object ID (extracted) // Delete if Allowed if ($sync !== false || !empty($obj->firebase)) { \Firebase::delete('/' . $path . '/' . $id); } }